Cluster Access
Set up network connectivity (wireguard)
As clusters use private networking and the K8s API isn’t publicly accessible, we use wireguard to connect.
The wireguard config is available using the bi tool.
[bix] bi vpn config $CLUSTER_NAMEThat config will need to be saved to /etc/wireguard so that wireguard can read it. e.g.
bi vpn config $CLUSTER_NAME | sudo tee /etc/wireguard/wg0.confThen the interface can be brought up.
wg-quick up wg0.confKubeconfig
The path to the K8s config file is also available using the bi tool.
[bix] bi debug kube-config-path $CLUSTER_NAMEThat can be used either as an env var or kubectl flag.
# env var
KUBECONFIG=$(bi debug kube-config-path $CLUSTER_NAME) kubectl cluster-info
# flag
kubectl --kubeconfig=$(bi debug kube-config-path $CLUSTER_NAME) cluster-info