Skip to content
Permalink
Browse files

Server URL in multus kubeconfig at /etc/cni/net.d/multus.d/multus.kub…

…econfig

is not properly setup for IPv6 installs

Fix:

If the API server host is IPv6 address then the server url should
include square braces to separate the IP address and port correctly
  • Loading branch information
svallala authored and s1061123 committed Nov 13, 2019
1 parent a371281 commit cb3f59e7e72a2c5ae8c826e7a3467e1adc2e24f3
Showing with 1 addition and 5 deletions.
  1. +1 −5 images/entrypoint.sh
@@ -191,10 +191,6 @@ if [ -f "$SERVICE_ACCOUNT_PATH/token" ]; then
# We're running as a k8d pod - expect some variables.
if [ -z ${KUBERNETES_SERVICE_HOST} ]; then
error "KUBERNETES_SERVICE_HOST not set"; exit 1;
elif [[ ${KUBERNETES_SERVICE_HOST} == *":"* ]]; then
K8S_API_SERVICE_HOST="[${KUBERNETES_SERVICE_HOST}]"
else
K8S_API_SERVICE_HOST="${KUBERNETES_SERVICE_HOST}"
fi
if [ -z ${KUBERNETES_SERVICE_PORT} ]; then
error "KUBERNETES_SERVICE_PORT not set"; exit 1;
@@ -219,7 +215,7 @@ kind: Config
clusters:
- name: local
cluster:
server: ${KUBERNETES_SERVICE_PROTOCOL:-https}://${K8S_API_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}
server: ${KUBERNETES_SERVICE_PROTOCOL:-https}://[${KUBERNETES_SERVICE_HOST}]:${KUBERNETES_SERVICE_PORT}
$TLS_CFG
users:
- name: multus

0 comments on commit cb3f59e

Please sign in to comment.
You can’t perform that action at this time.