Kubernetes cheat sheet

Define services

CommandDescription
kubectl apply -f [file.yml|folder]Create / Update services defined in yml/folder
kubectl delete -f [file.yml|folder]Delete services defined in yml/folder
kubectl patch deployment DEPLOYMENTNAME -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"date +'%s'\"}}}}}"Modify deployment to recreate pods