kubectl 1.37 cheatsheet
kubectl 1.37: Creating and changing
8 common kubectl 1.37 tasks.
Apply a Kustomize directory
Build and apply a folder containing a kustomization.yaml.
kubectl apply -k overlays/prod
Expose a deployment as a service
Create a service in front of a deployment.
kubectl expose deployment web --port=80
Edit a resource in your editor
Open the live definition and apply your changes on save.
kubectl edit deployment web
Delete resources from a manifest
Delete everything defined in a file.
kubectl delete -f deployment.yaml
Caution: Check kubectl config current-context first so you don't delete on the wrong cluster.
Delete a pod
Delete a pod. A controller usually creates a replacement.
kubectl delete pod web-7d9f8c6b5-abcde