Skip to content

Instantly share code, notes, and snippets.

@jdayllon
Created March 13, 2021 18:36
Show Gist options
  • Save jdayllon/1503a31efb317c91d29ed050244fe537 to your computer and use it in GitHub Desktop.
Save jdayllon/1503a31efb317c91d29ed050244fe537 to your computer and use it in GitHub Desktop.
Example KubeConfig with External and Internal K8S Cluster pointing to the same cluster
apiVersion: v1
clusters:
- cluster:
server: https://external-api-access-secured
name: external-k8s-cluster
- cluster:
certificate-authority-data: UNREADABLE_LONG_STRING_WITH_A_CERTIFICATE
server: https://internal-network-address-to-k8s:16443
name: internal-k8s-cluster
contexts:
- context:
cluster: internal-k8s-cluster
user: admin
name: internal-k8s
- context:
cluster: external-k8s-cluster
user: admin
name: external-k8s
current-context: external-k8s
kind: Config
preferences: {}
users:
- name: admin
user:
token: STRING_WITH_A_LONG_TOKEN_FROM_K8S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment