mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 21:53:52 +00:00
Merge pull request #42518 from mtanino/issue/42517
Automatic merge from submit-queue get-kube-local.sh checks pods with option "--namespace=kube-system" **What this PR does / why we need it**: Local cluster creation using get-kube-local.sh is never finished. The get-kube-local.sh monitors running_count of pods such as etcd, master and kube-proxy, but these pods are created under the namespace kube-system. Therefore kubectl can't find these pods then cluster creation isn't completed. The get-kube-local.sh should monitor created pods with option "--namespace=kube-system". **Which issue this PR fixes** : fixes #42517 **Release note**: ``` `NONE` ```
This commit is contained in:
@@ -80,7 +80,7 @@ function create_cluster {
|
||||
|
||||
echo -e -n "\tWaiting for master components to start..."
|
||||
while true; do
|
||||
local running_count=$(kubectl -s=http://${KUBE_HOST}:8080 get pods --no-headers 2>/dev/null | grep "Running" | wc -l)
|
||||
local running_count=$(kubectl -s=http://${KUBE_HOST}:8080 get pods --no-headers --namespace=kube-system 2>/dev/null | grep "Running" | wc -l)
|
||||
# We expect to have 3 running pods - etcd, master and kube-proxy.
|
||||
if [ "$running_count" -ge 3 ]; then
|
||||
break
|
||||
|
Reference in New Issue
Block a user