Kubernetes Installation of the Kubernetes Family "Kubeadm Way Installation"
Kubeadm Way Installation
Posted by chyuan on
2022-11-11
Estimated Reading Time 6 Minutes
Words 1k In Total
General & Background
It’s been some time since studying Kubernetes and using Kubernetes for actual projects. Kubernetes series can be regarded as my learning record, first, briefly sort out some learning notes to share with you, revealing what is the very hot, popular Kubernetes ~, the emergence of new technology must have its reason, but don’t look at the flowers in the fog, feel particularly mysterious that’s it, this note starts with installation.
1.Pre-installation preparation (every server has to do this)
1.7 Download the necessary image packages and work packages for Kubernetes (if 1.6 is set, you can skip it, and you can use the following ways to go to the sea if there is no HTTP proxy available)
I originally planned to upload it myself, but I found that another big guy has already uploaded related images and tools on CSDN: Kubernetes 1.19.4 version images and tools How to use the image: Download and unzip and upload directly to the server Use “docker load -i xxx.tar” to use, don’t forget that the master node and worker node must be imported, kubeadm, kubectl and other installation packages installation methods please check yourself, no additional instructions are made here
1.8 Check the Kubernetes image
1 2 3 4 5 6 7 8 9
$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE k8s.gcr.io/kube-proxy v1.19.4635b36f4d89f 6 months ago 118MB k8s.gcr.io/kube-controller-manager v1.19.44830ab618586 6 months ago 111MB k8s.gcr.io/kube-apiserver v1.19.4 b15c6247777d 6 months ago 119MB k8s.gcr.io/kube-scheduler v1.19.414cd22f7abe7 6 months ago 45.7MB k8s.gcr.io/etcd 3.4.13-00369cf4303ff 9 months ago 253MB k8s.gcr.io/coredns 1.7.0 bfe3a36ebd25 11 months ago 45.2MB k8s.gcr.io/pause3.280d28bedfe5d 15 months ago 683kB
2.Install K8S
2.1 Install tools such as kubeadm (if you download offline packages, you can skip this command)
Note: –pod-network-cidr=10.244.0.0/16 do not change the network segment randomly, otherwise it will have an impact on the next steps to install the network plug-in flannel, flannel defaults to this network segment, if there is a modification here, then the installation of flannel also needs to have corresponding adjustments, the specific adjustment method please search on flannel’s GitHub issue. Don’t ask me why I know ~~ I don’t know how I know. After the installation is complete, it will print something similar to the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Your Kubernetes control-plane has initialized successfully!
To startusing your cluster, you need to run the following asa regular user:
You should now deploy a pod network tothe cluster. Run "kubectl apply -f [podnetwork].yaml"withoneofthe options listed at: https://kubernetes.io/docs/concepts/cluster-administration/addons/
Then you can join anynumberof worker nodes by running the following oneachasroot:
$ kubectl get nodes NAME STATUS ROLES AGE VERSION masterReady65111to65139,master187d v1.19.4 node1 Ready 65141to65169,node187d v1.19.4 node2 Ready 65171to65199,node187d v1.19.4
If it is displayed as ready, the cluster status is normal, and the Kubernetes cluster installation is complete
4.Conclusion
When you see new technologies, don’t be afraid to go deeper, the emergence of new technologies must be because of the emergence of new needs, new needs appear, but the original solution to the corresponding problem is not enough, then it will promote the emergence and development of new technical theories.
Don’t learn new technology for the sake of learning new technology, because it is not easy to understand without specific use of new technology, starting from the problem to the solution and technology.
Don’t understand what new technology does, learn not to understand it, first learn to use it, and then complement each other with bold guesses, carefully verify.
If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you !