feat: add kube-vip to control plane role
This commit is contained in:
@@ -2,3 +2,4 @@ ansible_python_interpreter: /usr/bin/python3
|
|||||||
ansible_become_exe: sudo.ws
|
ansible_become_exe: sudo.ws
|
||||||
ansible_user: kolibri
|
ansible_user: kolibri
|
||||||
vip_interface: eno1
|
vip_interface: eno1
|
||||||
|
vip_address: 10.0.0.200
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
ansible_python_interpreter: /usr/bin/python3
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
ansible_user: kolibri
|
ansible_user: kolibri
|
||||||
vip_interface: enp5s0
|
vip_interface: enp5s0
|
||||||
|
vip_address: 10.150.0.100
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
|
- name: Install kube-vip
|
||||||
|
ansible.builtin.import_tasks: kube-vip.yaml
|
||||||
|
|
||||||
- name: Initialise Kubernetes cluster
|
- name: Initialise Kubernetes cluster
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
argv:
|
argv:
|
||||||
- kubeadm
|
- kubeadm
|
||||||
- init
|
- init
|
||||||
- --pod-network-cidr=172.16.0.0/16
|
- --pod-network-cidr=172.16.0.0/16
|
||||||
- --control-plane-endpoint={{ ansible_facts['default_ipv4']['address'] }}:6443
|
- --control-plane-endpoint={{ vip_address }}:6443
|
||||||
- --upload-certs
|
- --upload-certs
|
||||||
args:
|
args:
|
||||||
creates: /etc/kubernetes/admin.conf
|
creates: /etc/kubernetes/admin.conf
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ spec:
|
|||||||
- name: vip_retryperiod
|
- name: vip_retryperiod
|
||||||
value: "2"
|
value: "2"
|
||||||
- name: address
|
- name: address
|
||||||
value: 10.150.0.100
|
value: {{ vip_address }}
|
||||||
- name: prometheus_server
|
- name: prometheus_server
|
||||||
value: :2112
|
value: :2112
|
||||||
image: ghcr.io/kube-vip/kube-vip:v1.2.1
|
image: ghcr.io/kube-vip/kube-vip:v1.2.1
|
||||||
|
|||||||
Reference in New Issue
Block a user