Skip to content

Instantly share code, notes, and snippets.

@cppxaxa
Created October 5, 2023 04:25
Show Gist options
  • Save cppxaxa/0cac0edc7f18bc574a3ead45c857bb15 to your computer and use it in GitHub Desktop.
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
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
@cppxaxa
Copy link
Author

cppxaxa commented Oct 5, 2023

Command to get the token: microk8s kubectl describe secrets --all-namespaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment