Skip to content
Snippets Groups Projects
Commit 078f83b3 authored by Peter Toth's avatar Peter Toth
Browse files

Upload New File

parent a9de353d
No related branches found
No related tags found
No related merge requests found
- hosts: master_nodes
become: true
become_user: root
tasks:
- name: touch aliases
shell: "touch /root/.bash_aliases"
- name: Add kube-vip alias for root user
# kube-vip version v0.5.6 (Nov 2022)
lineinfile:
path=/root/.bash_aliases
line="alias kube-vip='ctr image pull ghcr.io/kube-vip/kube-vip:v0.5.6; ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:v0.5.6 vip /kube-vip'"
owner=root
regexp="^alias kube-vip='ctr image pull ghcr.io/kube-vip/kube-vip:v0.5.6; ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:v0.5.6 vip /kube-vip'"
- name: Pull kube-vip
shell: "ctr image pull ghcr.io/kube-vip/kube-vip:v0.5.6"
- name: Setup kube-vip
shell: "ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:v0.5.6 vip /kube-vip manifest pod --interface enp0s8 --address 192.168.56.40 --controlplane --services --arp --leaderElection"
register: setup_output
- name: Write manifest kube-vip
become: true
become_user: root
copy:
content: "{{ setup_output.stdout }}"
dest: "/etc/kubernetes/manifests/kube-vip.yaml"
- name: Apply kube-vip-cloud-contoller
become: true
become_user: vagrant
command: kubectl apply -f https://raw.githubusercontent.com/kube-vip/kube-vip-cloud-provider/main/manifest/kube-vip-cloud-controller.yaml
- name: Setup kube-vip-cloud-contoller
become: true
become_user: vagrant
command: kubectl create configmap -n kube-system kubevip --from-literal range-global=192.168.56.220-192.168.56.230
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment