Access K8s Cluster and Dashboard
?
S
BashScript to use a custodian container to view a k8s cluster dashboard
1function custodian() {
2 docker run --rm -it --net host --entrypoint="/bin/zsh" -v $(pwd):/cwd -v ~/.custodian/.zsh_history:/root/.zsh_history coderecipes/custodian:0.2-zsh $@
3}
4function k8s-dash() {
5 custodian -c "kubectl -n kubernetes-dashboard describe secret \$(kubectl -n kubernetes-dashboard get secret | grep admin-user | awk '{print \$1}') | grep token\:"
6 xdg-open http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
7 custodian -c "kubectl proxy"
8}Created on 11/14/2019