issues with K8s compiled docker images

3/30/2019

after cloning repo (tag v1.14.0)to local machine; i have modified cmd/kube-apiserver/app/server.go file; i hvae added one line of new code which is custome log entry upon K8s code compilation i found docker images tar ball in _output/release-images/amd64/ and i used docker load -i _output/release-images/amd64/kube-apiserver.tar it adds a newly built apiserver docker image but, rather than overwriting to tag it creates a new tag v1.14.0-dirty

enter image description here

now my question is how and why K8s is adding dirty suffix to image tag? Now when i do kubeam init it will still deploy original image with v1.14.0 tag and will not deploy newly built image which has v1.14.0-dirty tag

how do i launch K8s with newly built docker images?

-- ankit patel
kube-apiserver
kubeadm
kubernetes

2 Answers

3/30/2019

A quick and dirty solution would be to add another command:

docker tag k8s.gcr.io/kube-apiserver:v1.14.0-dirty k8s.gcr.io/kube-apiserver:v1.14.0

That should create the correct tag for the image.

The dirty tag could be applied during the tar build stage as the builder detects that the git repository state is dirty.

-- Frank Yucheng Gu
Source: StackOverflow

3/30/2019

Kubeadm creates manifests for api server, controller, scheduler services under /etc/kubernetes /manifests.

Update the api server image name in the above path and then delete api server pods.

-- P Ekambaram
Source: StackOverflow