2016-07-20 6 views
5

사용자 가이드에 따라 update a deployment's imagekubectl set/edit이 가능해야하며 여전히 의미가 있습니다 history.Kubernetes kubectl 이미지 배포가 --record history를 설정할 수 없습니까?

그러나 일부 오류가 발생하고 의미있는 기록이 보이지 않습니다. 버그 일 수 있습니까?

$ kubectl create -f kubernetes/deployment.yml --record 
deployment "nginx" created 

$ kubectl set image deployment/nginx nginx=nginx:0.2.0 
deployment "nginx" image updated 
changes to deployments/nginx can't be recorded: Operation cannot be fulfilled on deployments.extensions "nginx": the object has been modified; please apply your changes to the latest version and try againc 

$ kubectl set image deployment/nginx nginx=nginx:0.2.1 
deployment "nginx" image updated 
changes to deployments/nginx can't be recorded: Operation cannot be fulfilled on deployments.extensions "nginx": the object has been modified; please apply your changes to the latest version and try again 

$ kb rollout history deployment/nginx 
deployments "nginx": 
REVISION CHANGE-CAUSE 
1 kubectl create -f kubernetes/deployment.yml --record 
2 kubectl create -f kubernetes/deployment.yml --record 
3 kubectl create -f kubernetes/deployment.yml --record 

$ kubectl version 
Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.0+2831379", GitCommit:"283137936a498aed572ee22af6774b6fb6e9fd94", GitTreeState:"not a git tree", BuildDate:"2016-07-05T15:40:13Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"darwin/amd64"} 
Server Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.0", GitCommit:"283137936a498aed572ee22af6774b6fb6e9fd94", GitTreeState:"clean", BuildDate:"2016-07-01T19:19:19Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"} 

고마워요!

답변

1

변경 사항 기록을 위해 배포 주석을 업데이트 할 때 업데이트 충돌로 인한 것입니다. 즉, kubectl이 배포 변경 기록을 업데이트하면 배포 개체가 수정됩니다 (대부분 서버에 의해 변경 될 수 있음). kubectl set image은 현재 충돌 상황에서 변경 기록 업데이트를 다시 시도하지 않습니다.

나는 이것을 완화하기 위해 fix을 제출했습니다.

+0

이 문제는 1.3.0에서 발생했지만 1.3.4에서는 해결되었습니다. – Sion

+0

1.3.6에서이 문제가 발생합니다. – Zhomart

+0

나는 또한 1.3.6에서이 문제를보고있다. – Nopik