Kubectl error: the object has been modified; please apply your changes to the latest version and try again

前端 未结 4 1171
北恋
北恋 2021-01-03 19:34

I am getting below error while trying to apply patch :

core@dgoutam22-1-coreos-5760 ~ $ kubectl apply -f ads-central-configuration.yaml
Warning: kubectl appl         


        
4条回答
  •  太阳男子
    2021-01-03 20:26

    you may have been edited the same exported deployment file..

    1 - try to reexport it with:

    kubectl get deployment  -o yaml > deployment-file.yaml
    

    2 - make the needed modifications in "deployment-file.yaml"

    3 - apply the changes with:

    kubectl apply -f deployment-file.yaml
    

    OR:

    you may want to edit the deployment directly.. use :

    kubectl edit deployment -o yaml

    change the default editor if you aren't familiar with VI editor : export EDITOR=nano

提交回复
热议问题