mirror of https://github.com/k3s-io/k3s
Merge pull request #42681 from yujuhong/fix_restart
Automatic merge from submit-queue (batch tested with PRs 42652, 42681, 42708, 42730) e2e: fix restarting the apiserver The string used to match the image name of the apiserver (e.g., `gcr.io/google_containers/kube-apiserver:3be...`), but this no longer works. Change the test to locate the kube-apiserver container by name.pull/6/head
commit
1402cc588f
|
@ -4343,7 +4343,9 @@ func sshRestartMaster() error {
|
|||
}
|
||||
var command string
|
||||
if ProviderIs("gce") {
|
||||
command = "sudo docker ps | grep /kube-apiserver | cut -d ' ' -f 1 | xargs sudo docker kill"
|
||||
// `kube-apiserver_kube-apiserver` matches the name of the apiserver
|
||||
// container.
|
||||
command = "sudo docker ps | grep kube-apiserver_kube-apiserver | cut -d ' ' -f 1 | xargs sudo docker kill"
|
||||
} else {
|
||||
command = "sudo /etc/init.d/kube-apiserver restart"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue