2 Answers
When you use kops, kubemini or any other utility to create the kubernetes cluster, it creates and downloads the whole config along with token for communication to kubernetes API server. kubectl taks to API server and API server talks to the rest of system within the cluster. Once you delete the cluster, your token is also vanished. You can find the cluster context details directory ~/.kube/config
kubectl exec -ti $POD_NAME bash
You can extract your pod name via environment variables such this
export POD_NAME=$(kubectl get pods -o go-template –template ‘{{range .items}}{{.metadata.name}}{{"n"}}{{end}}’)
echo Name of the Pod: $POD_NAME
When you use kops, kubemini or any other utility to create the kubernetes cluster, it creates and downloads the whole config along with token for communication to kubernetes API server. kubectl taks to API server and API server talks to the rest of system within the cluster. Once you delete the cluster, your token is also vanished. You can find the cluster context details directory ~/.kube/config