100% found this document useful (1 vote)
39 views3 pages

Kubeadm

This document shows the steps to configure networking and install Kubernetes on CentOS. It configures Docker, installs Kubernetes components using kubeadm, and deploys Calico for networking between pods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
39 views3 pages

Kubeadm

This document shows the steps to configure networking and install Kubernetes on CentOS. It configures Docker, installs Kubernetes components using kubeadm, and deploys Calico for networking between pods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

1 ip addr sh

2 nmtui
3 ip addr sh
4 yum update
5 vi /etc/selinux/config
6 reboot
7 ip addr sh
8 nmtui
9 reboot
10 yum update
11 clear
12 cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
13 net.bridge.bridge-nf-call-ip6tables = 1
14 net.bridge.bridge-nf-call-iptables = 1
15 EOF
16 sudo sysctl --system
17 yum-config-manager --add-repo
https://download.docker.com/linux/centos/docker-ce.repo
18 dnf install 'dnf-command(config-manager)'
19 yum-config-manager --add-repo \
20 yum config-manager --add-repo
https://download.docker.com/linux/centos/docker-ce.repo
21 yum install docker-ce
22 yum install docker-ce --nobest
23 systemctl restart cocker
24 systemctl restart docker
25 systemctl enable docker
26 systemctl status docker
27 cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
28 [kubernetes]
29 name=Kubernetes
30 baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-\
$basearch
31 enabled=1
32 gpgcheck=1
33 repo_gpgcheck=1
34 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
35 exclude=kubelet kubeadm kubectl
36 EOF
37 yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
38 systemctl enable --now kubelet
39 systemctl daemon-reload
40 systemctl status docker
41 kubeadm init --pod-network-cidr 10.10.10.0/16 --apiserver-advertise-
address=192.168.1.230
42 ping 8.8.8.8
43 yum instal tc
44 yum install tc
45 systemctl disable firewalld
46 systemctl stop firewalld
47 kubeadm init --pod-network-cidr 10.10.10.0/16 --apiserver-advertise-
address=192.168.1.230
48 vi /etc/fstab
49 swapoff
50 swapoff -a
51 kubeadm init --pod-network-cidr 10.10.10.0/16 --apiserver-advertise-
address=192.168.1.230
52 halt
53 ip addr sh
54 yum update
55 ping 192.168.1.1
56 192.168.1.131
57 192.168.1.231
58 ping 192.168.1.231
59 kubeadm init --pod-network-cidr 10.10.10.0/16 --apiserver-advertise-
address=192.168.1.230
60 vi /etc/hosts
61 ping kube-master
62 kubeadm init --pod-network-cidr 10.10.10.0/16 --apiserver-advertise-
address=192.168.1.230
63 systemctl status kubelet
64 docker ps -a
65 free -m
66 halt
67 clear
68 kubeadm init --pod-network-cidr 10.10.10.0/16 --apiserver-advertise-
address=192.168.1.230
69 kubeadm reset cleanup-node
70 kubeadm init --pod-network-cidr 10.10.10.0/16 --apiserver-advertise-
address=192.168.1.230
71 mkdir -p $HOME/.kube
72 sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
73 sudo chown $(id -u):$(id -g) $HOME/.kube/config
74 kubectl get nodes
75 kubectl create -f https://docs.projectcalico.org/manifests/tigera-
operator.yaml
76 kubectl create -f https://docs.projectcalico.org/manifests/custom-
resources.yaml
77 kubectl get nodes
78 kubectl get pods
79 kubectl get pods -n kube-system
80 kubectl describe pods -n kube-system coredns-66bff467f8-54n9x
81 kubectl describe node kube-worker
82 kubectl get pods
83 kubectl get pods -n kube-system
84 kubectl describe -n kube-system coredns-66bff467f8-54n9x
85 kubectl describe pod -n kube-system coredns-66bff467f8-54n9x
86 kubectl logs -n kube-system coredns-66bff467f8-54n9x
87 kubectl describe pod -n kube-system coredns-66bff467f8-54n9x
88 docker get nodes
89 kubeadm get nodes
90 kubectl get nodes
91 kubectl describe nodes kube-worker
92 kubectl describe pod -n kube-system coredns-66bff467f8-54n9x
93 kubectl get pod -n kube-system
94 docker describe -n kube-system kube-scheduler-kube-master
95 docker logs -n kube-system kube-scheduler-kube-master
96 kubectl logs -n kube-system kube-scheduler-kube-master
97 docker get nodes
98 cear
99 clear
100 kubectl get nodes
101 kubectl get events node kube-master
102 kubectl events node kube-master
103 kubectl describe node kube-master
104 kubectl get nodes -o wide
105 kubectl describe node kube-master
106 kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
107 kubectl get nodes -o wide
108 kubectl get pod --all-namespaces
109 history

You might also like