Created
July 31, 2018 13:31
-
-
Save ethernetdan/b0d923dc55439a24109b047dc916931d to your computer and use it in GitHub Desktop.
Terraform Kubeconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Kubeconfig to access cluster. | |
output "kubeconfig" { | |
value = <<EOF | |
apiVersion: v1 | |
kind: Config | |
clusters: | |
- name: huv-cluster | |
cluster: | |
api-version: v1 | |
server: "https://${google_container_cluster.huv_cluster.endpoint}" | |
certificate-authority-data: ${google_container_cluster.huv_cluster.master_auth.0.cluster_ca_certificate} | |
users: | |
- name: huv-admin | |
user: | |
client-certificate-data: ${google_container_cluster.huv_cluster.master_auth.0.client_certificate} | |
client-key-data: ${google_container_cluster.huv_cluster.master_auth.0.client_key} | |
contexts: | |
- name: huv | |
context: | |
cluster: huv-cluster | |
user: huv-admin | |
current-context: huv | |
EOF | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment