File tree Expand file tree Collapse file tree 6 files changed +96
-20
lines changed Expand file tree Collapse file tree 6 files changed +96
-20
lines changed Original file line number Diff line number Diff line change 1
1
# self-managed-k8s-setup (WIP)
2
+
3
+ # clone project - (control plane and worker node)
4
+
5
+ ``` bash
6
+ git clone https://github.com/code4mk/self-managed-k8s-setup
7
+ ```
8
+ then change dir ` self-managed-k8s-setup `
9
+
10
+ ``` bash
11
+ cd self-managed-k8s-setup
12
+ ```
13
+
14
+ # control plane
15
+
16
+ 1 . install k8s (containerd and k8s)
17
+
18
+ ``` bash
19
+ ./k8s-setup.sh
20
+ ```
21
+
22
+ 2 . then check kubelet status
23
+
24
+ ``` bash
25
+ ./kubelet-status.sh
26
+ ```
27
+
28
+ if status is good go to next step (3) if faces error again run install k8s step (1)
29
+
30
+ 3 . control-plane setup
31
+
32
+ ``` bash
33
+ ./control-plane-setup.sh
34
+ ```
35
+
36
+ 4 . cni setup
37
+
38
+ before cni setup need to setup your worker node and worker node join with control plane
39
+
40
+ * this script setup flannel cni
41
+
42
+ ``` bash
43
+ ./contorl-plane-cni-setup
44
+ ```
45
+
46
+ ``` bash
47
+ kubectl get nodes
48
+ kubectl get pods -A -o wide
49
+ kubectl get svc -A -o wide
50
+ ```
51
+
52
+ # Worker node setup
53
+
54
+ 1 . install k8s (containerd and k8s)
55
+
56
+ ``` bash
57
+ ./k8s-setup.sh
58
+ ```
59
+
60
+ 2 . then check kubelet status
61
+
62
+ ``` bash
63
+ ./kubelet-status.sh
64
+ ```
65
+
66
+ if status is good go to next step (3) if faces error again run install k8s step (1)
67
+
68
+ 3 . join with control plane
69
+
70
+ you can manually join
71
+
72
+ ``` bash
73
+ sudo your_token
74
+ ```
75
+
76
+ or
77
+
78
+ ``` bash
79
+ ./worker-node-setup.sh
80
+ ```
81
+
82
+
83
+ # connect with lens
84
+
85
+ ``` bash
86
+ cd ~
87
+ cat .kube/config
88
+ ```
89
+
90
+ then copy the cat output and that will submit with lens ( join with kube config)
Original file line number Diff line number Diff line change @@ -48,7 +48,3 @@ sudo systemctl enable --now kubelet
48
48
# Check kubeadm version
49
49
print_green " Checking kubeadm version..."
50
50
kubeadm version
51
-
52
- # Check kubelet service status
53
- print_green " Checking kubelet service status..."
54
- sudo systemctl status kubelet
Original file line number Diff line number Diff line change @@ -24,14 +24,6 @@ if [[ -z "$pod_network_cidr" ]]; then
24
24
exit 1
25
25
fi
26
26
27
- # Run containerd installation
28
- print_green " Running containerd installation..."
29
- ./common/containerd-install.sh
30
-
31
- # Run Kubernetes installation
32
- print_green " Running Kubernetes installation..."
33
- ./common/k8s-install.sh
34
-
35
27
# Fetch the private IP address of the VM
36
28
private_ip=$( hostname -I | awk ' {print $1}' )
37
29
Original file line number Diff line number Diff line change
1
+ # Run containerd installation
2
+ print_green " Running containerd installation..."
3
+ ./common/containerd-install.sh
4
+
5
+ # Run Kubernetes installation
6
+ print_green " Running Kubernetes installation..."
7
+ ./common/k8s-install.sh
Original file line number Diff line number Diff line change @@ -8,14 +8,6 @@ print_green() {
8
8
# Exit on any error
9
9
set -e
10
10
11
- # Run containerd installation
12
- print_green " Running containerd installation..."
13
- ./common/containerd-install.sh
14
-
15
- # Run Kubernetes installation
16
- print_green " Running Kubernetes installation..."
17
- ./common/k8s-install.sh
18
-
19
11
# Prompt user for the full join command
20
12
read -p " Enter the full join command to join the worker node to the Kubernetes cluster: " join_command
21
13
You can’t perform that action at this time.
0 commit comments