Created
October 5, 2023 04:25
-
-
Save cppxaxa/0cac0edc7f18bc574a3ead45c857bb15 to your computer and use it in GitHub Desktop.
A script to expose the microk8s kubernetes-dashboard and bind the clusterIP:443 with host 443 port on all IPs
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
clusterIp=$(microk8s kubectl get service kubernetes-dashboard -n kube-system -o yaml | grep clusterIP: | awk '{print $2}') | |
echo "Found clusterIp=$clusterIp, now $clusterIp:443 port is forwarded to 0.0.0.0:443" | |
redir --lport 443 --laddr=0.0.0.0 --cport 443 --caddr=$clusterIp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Command to get the token: microk8s kubectl describe secrets --all-namespaces