I created a deployment for my application:
apiVersion: extensions/v1beta1 kind: Deployment metadata: name: myapp1 spec: replicas: 2 template: metadata: labels: app: myapp spec: containers: - name: myapp image: 172.20.34.206:5000/myapp_img:2.0 ports: - containerPort: 8080
Now to do a rolling update I do this:
$ kubectl edit deployment/myapp1
editor opens and I change the image version and save
Can this be automated? Can I do it just by running a command instead of opening, saving and deploying again? Eg:
$ kubectl edit deployment/myapp1 --image=172.20.34.206:5000/myapp:img:3.0
I thought using Kubernetes API REST but I don't understand the documentation.