Initial commit.
This commit is contained in:
commit
38c0b98fa8
8 changed files with 199 additions and 0 deletions
31
bin/traefik-cert.sh
Executable file
31
bin/traefik-cert.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
# Script to update the
|
||||
secret="localhost-mixinet-net-ingress-cert"
|
||||
cert="${1:-localhost.mixinet.net.crt}"
|
||||
key="${2:-localhost.mixinet.net.key}"
|
||||
if [ -f "$cert" ] && [ -f "$key" ]; then
|
||||
kubectl -n kube-system create secret tls $secret \
|
||||
--key=$key \
|
||||
--cert=$cert \
|
||||
--dry-run=client --save-config -o yaml | kubectl apply -f -
|
||||
kubectl apply -f - << EOF
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: TLSStore
|
||||
metadata:
|
||||
name: default
|
||||
namespace: kube-system
|
||||
|
||||
spec:
|
||||
defaultCertificate:
|
||||
secretName: $secret
|
||||
EOF
|
||||
else
|
||||
cat <<EOF
|
||||
To add or update the traefik TLS certificate the following files are needed:
|
||||
|
||||
- cert: '$cert'
|
||||
- key: '$key'
|
||||
|
||||
Note: you can pass the paths as arguments to this script.
|
||||
EOF
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue