|
1 |
| -kubeadm init --apiserver-advertise-address=10.46.176.28 --pod-network-cidr=192.168.1.0/16 |
| 1 | + |
2 | 2 |
|
3 | 3 | Steps to setup K8-cluster in centos Flavour (combination of worker nodes and master node is called as Kubernetes cluster)
|
4 | 4 | ========================================================================================================================
|
@@ -29,6 +29,12 @@ This step because all the 3 nodes should communicate each other.
|
29 | 29 |
|
30 | 30 | important:
|
31 | 31 |
|
| 32 | +create a filename with firewall.sh |
| 33 | +and add the line no 35 to 57 inside the file |
| 34 | +and run the firewall.sh file |
| 35 | +with following command |
| 36 | +bash firewall.sh |
| 37 | + |
32 | 38 | #!/bin/bash
|
33 | 39 | set -x
|
34 | 40 | firewall-cmd --permanent --add-port=6443/tcp
|
@@ -56,16 +62,6 @@ set +x
|
56 | 62 |
|
57 | 63 | iptables -w -P FORWARD ACCEPT
|
58 | 64 |
|
59 |
| -cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf |
60 |
| -br_netfilter |
61 |
| -EOF |
62 |
| - |
63 |
| -cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf |
64 |
| -net.bridge.bridge-nf-call-ip6tables = 1 |
65 |
| -net.bridge.bridge-nf-call-iptables = 1 |
66 |
| -EOF |
67 |
| -sudo sysctl --system |
68 |
| - |
69 | 65 | modprobe overlay
|
70 | 66 | modprobe br_netfilter
|
71 | 67 | tee /etc/sysctl.d/kubernetes.conf<<EOF
|
|
91 | 87 |
|
92 | 88 | 4. Firewalld package should be installed in AWS Ubuntu OS, and Disabled.
|
93 | 89 |
|
94 |
| - |
95 |
| - Sudo systemctl status firewalld |
96 |
| - Sudo systemctl stop firewalld |
| 90 | + install the package firewalld |
| 91 | + yum install firewalld -y |
| 92 | + |
| 93 | + systemctl status firewalld |
| 94 | + systemctl start firewalld |
97 | 95 |
|
98 | 96 | 5. SWAP memory will not support for K8, because cache memory will not required.
|
99 | 97 |
|
100 |
| - sudo Free -m |
101 |
| - sudo Swappoff -a |
| 98 | + free -m |
| 99 | + swappoff -a |
102 | 100 |
|
103 | 101 | 6. SeLinux is disabled
|
104 |
| - sudo Sestatus |
105 |
| - sudo setenforce 0 |
106 |
| - sudo Sestatus |
| 102 | + sestatus |
| 103 | + setenforce 0 |
| 104 | + sestatus |
107 | 105 |
|
108 | 106 | # setenforce 0
|
109 | 107 | # sed -i --follow-symlinks 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
|
@@ -190,6 +188,6 @@ Only in Master node-Run the following commands and network add ons plugins in ma
|
190 | 188 |
|
191 | 189 |
|
192 | 190 |
|
193 |
| - |
| 191 | + kubeadm init --apiserver-advertise-address=10.46.176.28 --pod-network-cidr=192.168.1.0/16 |
194 | 192 | https://phoenixnap.com/kb/how-to-install-kubernetes-on-centos
|
195 | 193 | https://www.tecmint.com/install-kubernetes-cluster-on-centos-7/
|
0 commit comments