1 pwd
2 less /etc/issue
3 for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
4 sudo apt-get update
5 sudo apt-get install ca-certificates curl gnupg
6 pwd
7 sudo install -m 0755 -d /etc/apt/keyrings
8 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
9 sudo chmod a+r /etc/apt/keyrings/docker.gpg
10 echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
11 "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
12 sudo apt-get update
13 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
14 sudo docker run hello-world
15 vim /etc/containerd/config.toml
16 sudo swapoff -a
17 nc 127.0.0.1 6443
18 sudo apt-get update
19 sudo apt-get install -y apt-transport-https ca-certificates curl
20 curl -fsSL https://dl.k8s.io/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg
21 echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
22 sudo apt-get update
23 sudo apt-get install -y kubelet kubeadm kubectl
24 sudo apt-mark hold kubelet kubeadm kubectl
25 sudo apt-get install -y kubelet kubeadm kubectl
26 sudo apt-get update
27 exit
28 curl https://www.baidu.com -x http://127.0.0.1:3130
29 exit
30 curl https://www.baidu.com -x http://127.0.0.1:3130
31 http_proxy=http://127.0.0.1:3130 https_proxy=http://127.0.0.1:3130 apt-get update
32 apt-get update
33 sudo apt-get install -y kubelet kubeadm kubectl
34 kubelet --version
35 ip list
36 ip addr
37 kubeadm init
38 systemctl restart containerd
39 kubeadm init
40 vim /etc/containerd/config.toml
41 systemctl restart containerd
42 kubeadm init
43 exit
44 kubeadm config images pull
45 http_proxy=http://127.0.0.1:3130 https_proxy=http://127.0.0.1:3130 kubeadm config images pull
46 kubeadm config images list
47 kubeadm config images list | awk -F'/' '{OFS=FS;
$1=""
printf $0 " ";
if(NF==3) $2="google_containers"; else $2="google_containers/"$2;
print $0}'
48 kubeadm config images -h
49 kubeadm config images list
50 which kubeadm
51 less /usr/bin/kubeadm
52 export http_proxy=http://127.0.0.1:3130 https_proxy=http://127.0.0.1:3130
53 kubeadm config images pull
54 kubeadm config images --help
55 kubeadm config --help
56 kubeadm init --help
57 kubeadm config images pull --with-proxy=http://127.0.0.1:3130
58 kubeadm init --with-proxy=http://127.0.0.1:3130 --v=5
59 kubeadm config images pull -v5
60 http_proxy=http://127.0.0.1:3130 https_proxy=http://127.0.0.1:3130 kubeadm config images pull -v5
61 curl ubelet.go:196] the value of KubeletConfiguration.cgroupDriver is empty; setting it to "systemd"
62 curl https://dl.k8s.io/release/stable-1.txt
63 kubeadm config images pull -v5
64 kubeadm config images pull -v6
65 kubeadm --version
66 kubeadm version
67 kubelet --version
68 kubeadm init --kubernetes-version=v1.28.1
69 kubeadm config images pull
70 kubeadm config images pull -v5
71 kubeadm config images pull --kubernetes-version=v1.25.0
72 kubeadm config images pull --kubernetes-version=v1.25.0 -v5
73 kubeadm config images pull --kubernetes-version=v1.28.1 -v5
74 systemctl start kubelet
75 kubeadm init --kubernetes-version=v1.28.1
76 kubeadm init --kubernetes-version=v1.28.1 -v5
77 mkdir /etc/systemd/system/containerd.service.d
78 vim /etc/systemd/system/containerd.service.d/http-proxy.conf
79 systemctl restart containerd
80 systemctl daemon-reload
81 systemctl restart containerd
82 kubeadm config images pull -v5
83 kubeadm config images pull --kubernetes-version=v1.25.0 -v5
84 kubeadm config images pull --kubernetes-version=v1.28.1 -v5
85 unset http_proxy=http://127.0.0.1:3130 https_proxy=http://127.0.0.1:3130
86 unset http_proxy https_proxy
87 kubeadm init --kubernetes-version=v1.28.1 -v5
88 mkdir -p $HOME/.kube
89 sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
90 sudo chown $(id -u):$(id -g) $HOME/.kube/config
91 kubectl