Created
June 10, 2020 22:54
-
-
Save JohnKDay/216d78e71f9d98d6a8a5713e4ecae138 to your computer and use it in GitHub Desktop.
get CCP 6.1 Addons info
This file contains hidden or 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
#!/usr/bin/env bash | |
# Get the Cluster ingress IP | |
IP=$(kubectl get svc -n ccp nginx-ingress-controller -o jsonpath='{.spec.loadBalancerIP}') | |
printf "Harbor UI\n" | |
printf "https://%s/\n" ${IP} | |
printf "username: admin\n" | |
pass=$(kubectl get secret -n ccp ccp-harbor-cr -o jsonpath='{.data.admin-password}' 2>/dev/null| base64 --decode) | |
printf "password: %s\n\n" ${pass:-'NOT CONFIGURED'} | |
printf "Kubernetes Dashboard\n" | |
printf "https://%s/dashboard/\n" ${IP} | |
pass=$(kubectl describe secret -n kube-system ccp-dashboard-token 2>/dev/null| awk '$1=="token:" {print $2}') | |
printf "Token: %s\n\n" ${pass:-'NOT CONFIGURED'} | |
printf "Grafana UI\n" | |
printf "https://%s/grafana/\n" ${IP} | |
printf "username: admin\n" | |
pass=$(kubectl get secret -n ccp ccp-monitor-grafana -o jsonpath='{.data.admin-password}' 2>/dev/null| base64 --decode) | |
printf "password: %s\n\n" ${pass:-'NOT CONFIGURED'} | |
printf "Cluster ingress CA cert\n" | |
mkdir -p /tmp/${IP} | |
kubectl get secret -n ccp ccp-root-ca -o jsonpath='{.data.ca\.crt}'| base64 --decode > /tmp/${IP}/ca.crt | |
cat /tmp/${IP}/ca.crt | |
printf "\nHint:\nsudo cp -r /tmp/${IP} /etc/docker/certs.d/\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment