Kubernetes:编辑部署时服务器出错

时间:2016-04-29 06:37:28

标签: kubernetes

我有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

现在,我想将图像从1.0升级到2.0,所以我这样做:

$ kubectl patch deployment app-deployment -p '{"spec":{"containers":[{"name":"myapp","image":"172.20.34.206:5000/myapp_img:2.0"}]}}'

但是我收到了这个错误:

  

服务器出错:服务器拒绝了我们的未知请求   原因(patch deployments.extensions app-deployment)

如果我通过Deployment修改kubectl edit deployment/app-deployment,它就可以正常使用。

0 个答案:

没有答案