summaryrefslogtreecommitdiffstats
path: root/ansible/roles/rancher/templates/kube_config.j2
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/rancher/templates/kube_config.j2')
-rw-r--r--ansible/roles/rancher/templates/kube_config.j219
1 files changed, 19 insertions, 0 deletions
diff --git a/ansible/roles/rancher/templates/kube_config.j2 b/ansible/roles/rancher/templates/kube_config.j2
new file mode 100644
index 00000000..586c59d4
--- /dev/null
+++ b/ansible/roles/rancher/templates/kube_config.j2
@@ -0,0 +1,19 @@
+apiVersion: v1
+kind: Config
+clusters:
+- cluster:
+ api-version: v1
+ insecure-skip-tls-verify: true
+ server: "{{ kube_server }}"
+ name: "{{ app_name }}"
+contexts:
+- context:
+ cluster: "{{ app_name }}"
+ user: "{{ app_name }}"
+ name: "{{ app_name }}"
+current-context: "{{ app_name }}"
+users:
+- name: "{{ app_name }}"
+ user:
+ token: "{{ (['Basic', [key_public, key_private] | join(':') | b64encode] | join(' ')) | b64encode }}"
+