Skip to content

Instantly share code, notes, and snippets.

@magohl
Last active April 5, 2022 20:57
Show Gist options
  • Save magohl/4a9ef9fdbd543c2f915b5e9bed1a0bbd to your computer and use it in GitHub Desktop.
Save magohl/4a9ef9fdbd543c2f915b5e9bed1a0bbd to your computer and use it in GitHub Desktop.
Kubernetes stuff
minimal create
kubectl run test --rm -it --image=alpine --generator=run-pod/v1
kubectl proxy
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
Get token
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^deployment-controller-token-/{print $1}') | awk '$1=="token:"{print $2}'
Fix PVC stuck in terminating
kubectl patch pvc some-pvc -p '{"metadata":{"finalizers":null}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment