cluster networking operational
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
---
|
||||
k8s_control_master_node: kube01.balsillie.net
|
||||
k8s_endpoint: k8s.balsillie.net
|
||||
k8s_address: "192.168.199.240"
|
||||
k8s_api_port: "6443"
|
||||
k8s_cri_socket: /run/containerd/containerd.sock
|
||||
k8s_service_domain: cluster.internal
|
||||
|
@ -1,4 +1,10 @@
|
||||
---
|
||||
- name: write cluster api address to hosts file
|
||||
ansible.builtin.lineinfile:
|
||||
line: "{{ k8s_address }} {{ k8s_endpoint }}"
|
||||
insertafter: EOF
|
||||
path: /etc/hosts
|
||||
|
||||
- name: create containerd config dir
|
||||
ansible.builtin.file:
|
||||
path: /etc/containerd
|
||||
@ -53,6 +59,7 @@
|
||||
--node-name {{ ansible_hostname }} \
|
||||
--feature-gates IPv6DualStack=false \
|
||||
--feature-gates PublicKeysECDSA=true \
|
||||
--skip-phases=addon/kube-proxy \
|
||||
--service-dns-domain {{ k8s_service_domain }} \
|
||||
creates: /etc/kubernetes/admin.conf
|
||||
register: k8s_init
|
||||
@ -102,5 +109,6 @@
|
||||
--control-plane \
|
||||
--certificate-key {{ hostvars[groups['k8s_control'][0]]['join_key']['stdout_lines'][2] }} \
|
||||
--cri-socket /run/containerd/containerd.sock \
|
||||
--skip-phases=addon/kube-proxy \
|
||||
--node-name {{ ansible_hostname }}
|
||||
creates: /etc/kubernetes/admin.conf
|
||||
|
Reference in New Issue
Block a user