I have this Deployment
:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: app-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: app
spec:
containers:
- name: app
image: 172.20.34.206:5000/myapp_img:1.0
ports:
- containerPort: 8080
Now, I want to upgrade the image from 1.0 to 2.0, so I do this:
$ kubectl patch deployment app-deployment -p '{"spec":{"containers":[{"name":"myapp","image":"172.20.34.206:5000/myapp_img:2.0"}]}}'
But I get this error:
Error from server: the server rejected our request for an unknown reason (patch deployments.extensions app-deployment)
If I edit the Deployment
via kubectl edit deployment/app-deployment
, it works properly.