[stage-2] create kubectl_init ansible-playbook

fix cluster.tf, update readme
This commit is contained in:
2023-03-17 11:10:28 +07:00
parent de8cd9f424
commit af79b9f67f
8 changed files with 66 additions and 4 deletions

20
templates/kubectl/conf.j2 Normal file
View File

@@ -0,0 +1,20 @@
---
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: {{ k8s_certificate_auth_data }}
server: https://{{ hostvars['control'].ansible_host }}:6443
name: cluster.local
contexts:
- context:
cluster: cluster.local
user: kubernetes-admin
name: kubernetes-admin@cluster.local
current-context: kubernetes-admin@cluster.local
kind: Config
preferences: {}
users:
- name: kubernetes-admin
user:
client-certificate-data: {{ k8s_user_client_cert_data }}
client-key-data: {{ k8s_user_client_key_data }}

View File

@@ -0,0 +1,2 @@
[all]
control ansible_host={{ kube_control_node_host }}