Created
February 3, 2021 13:25
-
-
Save luqmansen/dafc3f8d4180940e4aefa80cda88c6ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p k8s/cert/ && cd k8s/cert/ | |
openssl req -nodes -newkey rsa:2048 -keyout dashboard.key -out dashboard.csr -subj "/C=/ST=/L=/O=/OU=/CN=*" | |
openssl x509 -req -sha256 -days 3650 -in dashboard.csr -signkey dashboard.key -out dashboard.crt | |
microk8s kubectl -n kube-system delete secret kubernetes-dashboard-certs | |
microk8s kubectl -n kube-system create secret generic kubernetes-dashboard-certs --from-file=dashboard.crt --from-file=dashboard.key | |
microk8s kubectl -n kube-system edit deploy kubernetes-dashboard -o yaml | |
# change args part | |
args: | |
- --tls-cert-file=dashboard.crt | |
- --tls-key-file=dashboard.key | |
#- --auto-generate-certificates | |
microk8s kubectl dashboard-proxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment