Kind: Need a way to get kubeconfig with node IP

Created on 4 May 2020  路  2Comments  路  Source: kubernetes-sigs/kind

What would you like to be added:
Some way to get the kubeconfig with the server field using the node container IP rather than the port forward on the hosts loopback or the internal DNS.

Why is this needed:

You could do this in 0.7 and on Linux it works from both host and inside the node / pods

kindesign kinfeature lifecyclfrozen prioritimportant-longterm

Most helpful comment

kind get kubeconfig --name "${CLUSTER_NAME}" --internal | sed "s/${CLUSTER_NAME}-control-plane/$(docker inspect "${CLUSTER_NAME}-control-plane" --format "{{ .NetworkSettings.Networks.kind.IPAddress }}")/g"

Is a workaround

All 2 comments

kind get kubeconfig --name "${CLUSTER_NAME}" --internal | sed "s/${CLUSTER_NAME}-control-plane/$(docker inspect "${CLUSTER_NAME}-control-plane" --format "{{ .NetworkSettings.Networks.kind.IPAddress }}")/g"

Is a workaround

/assign

Was this page helpful?
0 / 5 - 0 ratings