Browse Source

Set k8s apiserver preferred address type arg

Currently not able to run kubectl exec/logs commands
with a k8s cluster created on devstack. This is due
to the fact that apiserver is not able to resolve
the worker node by hostname. This change fixes the
issue by passing --kubelet-preferred-address-types
argument to apiserver.

Change-Id: I9d328626723d11372a6d912fae4edd33b8f01277
Closes-Bug: #1668337
(cherry picked from commit 396439f703)
Vijendar Komalla 2 years ago
parent
commit
7cf0b5051a

+ 1
- 0
magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-master.sh View File

@@ -18,6 +18,7 @@ else
18 18
     KUBE_API_ARGS="$KUBE_API_ARGS --tls-cert-file=/srv/kubernetes/server.crt"
19 19
     KUBE_API_ARGS="$KUBE_API_ARGS --tls-private-key-file=/srv/kubernetes/server.key"
20 20
     KUBE_API_ARGS="$KUBE_API_ARGS --client-ca-file=/srv/kubernetes/ca.crt"
21
+    KUBE_API_ARGS="$KUBE_API_ARGS --kubelet-preferred-address-types=InternalIP,Hostname,ExternalIP"
21 22
 fi
22 23
 
23 24
 KUBE_ADMISSION_CONTROL=""

Loading…
Cancel
Save