I'm trying to find a quick command to redeploy a pod in Kubernetes.
kubectl -n pringadi get pods
NAME READY STATUS RESTARTS AGE
audit-server-757ffd5dd-ztn5s 1/1 Running 0 38m
configs-service-75c98f68c7-q928q 1/1 Running 0 36m
kubectl edit deployment audit-server
.Kubernetes immediately recognizes the change and redeploy audit-server
.
Question:
What if I pushed my docker image (a newer image) to google cloud with the same name (Step 4) and just want to redeploy the audit-server
based on the current image. Is there a command for that? It a tedious job to keep editing the deployment config (Step 3)
It's wholly unclear what you're trying to do, but taking a guess:
kubectl set image deploy audit-server "*=us.gcr.io/whatever/whateverelse:12345"
will bump the image in your deployment without having to invoke your editor
Alternatively, use something like skaffold or its competitors to continuously push and reload a Pod for development