Kubernetes obtain secrets and tokens
Published (last updated )
# ms-windows-store://pdp/?ProductId=9n4wgh0z6vhq
kubectl apply -f gitlab-admin.yml
kubectl config view --raw -o=jsonpath='{.clusters[0].cluster.certificate-authority-data}' | base64 --decode
export SECRET=$(kubectl -n kube-system get secret | grep gitlab-admin | awk '{print $1}')
export TOKEN=$(kubectl -n kube-system get secret $SECRET -o jsonpath='{.data.token}' | base64 --decode)