Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/resources/kubernetes-configuration/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Vagrant.configure("2") do |config|
master.vm.box = LINUX_BASE_BOX
master.vm.hostname = "master"
master.vm.network "private_network", ip: ip
master.vm.network "forwarded_port", guest: 6443, host: 6443

master.vm.provider "virtualbox" do |virtualbox|
virtualbox.customize ["modifyvm", :id, "--cableconnected1", "on", "--audio", "none"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ clients:
# NOTE: Replace `Europe/Amsterdam` with your timezone
local_time_zone: "Europe/Amsterdam"

pod_network: 10.10.0.0/16
local_network: 10.140.0.0/16
local_network: 10.10.0.0/16
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

- name: Initialize Kubernetes cluster
become: yes
ansible.builtin.shell: "kubeadm init --apiserver-advertise-address={{ node_ip }} --pod-network-cidr={{ pod_network }}"
ansible.builtin.shell: "kubeadm init --apiserver-advertise-address={{ node_ip }}"

- name: Create .kube directory
ansible.builtin.file:
Expand All @@ -40,17 +40,11 @@

- name: Download Flannel network plugin
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
url: https://github.com/coreos/flannel/raw/master/Documentation/kube-flannel.yml
dest: /tmp/kube-flannel.yml
mode: '0644'
force: true

- name: Change Pod Network to desired
ansible.builtin.replace:
path: "/tmp/kube-flannel.yml"
regexp: '"Network": "10.244.0.0\/16"'
replace: '"Network": "{{ pod_network }}"'

- name: Apply Flannel network plugin
kubernetes.core.k8s:
state: present
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
---
- name: Copy the join command to server location
copy: src=join-command dest=/tmp/join-command.sh mode=0777

- name: Join the node to cluster
command: sh /tmp/join-command.sh

- name: Change interface to flannel
ansible.posix.firewalld:
zone: trusted
Expand All @@ -16,3 +10,9 @@
ansible.builtin.service:
name: firewalld
state: reloaded

- name: Copy the join command to server location
copy: src=join-command dest=/tmp/join-command.sh mode=0777

- name: Join the node to cluster
command: sh /tmp/join-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
- curl
- gpg
- firewalld
- acl

- name: Create directory for apt keyrings
ansible.builtin.file:
Expand Down Expand Up @@ -111,13 +110,6 @@
state: enabled
permanent: true

- name: Allow traffic on Pod Network
ansible.posix.firewalld:
source: "{{ pod_network }}"
zone: trusted
state: enabled
permanent: true

- name: Allow traffic on local Network
ansible.posix.firewalld:
source: "{{ local_network }}"
Expand Down