0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

kubectl apply したら please apply your changes to the latest version and try again エラーで困った

Last updated at Posted at 2020-07-30

背景

GKE環境で、リリース済みのdeploymentのimageを更新してデプロイしたかった。

kubectl get deployments deployment_name -o yaml で対象deploymentのyamlを取得して、imageのリンクを編集し、applyかけようとしたらエラーが発生。


kubectl apply -f some_deployment.yaml
~略~
Operation cannot be fulfilled on deployments.extensions "xxx": the object has been modified; please apply your changes to the latest version and try again

解決方法

yamlから以下の項目を削除したらエラーが出なくなった。オブジェクト依存の項目はリリース時のyamlには必要ないのかな(?)

  • deployment.kubernetes.io/revision
  • creationTimestamp
  • generation
  • resourceVersion
  • uid

参考

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

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?