Kubernetes series of Kubernetes installation Kubeadm "Centos installation Docker"

Centos installation Docker

Posted by chyuan on 2022-11-11
Estimated Reading Time 2 Minutes
Words 348 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 own reason, but don’t look at the flowers in the fog, feel particularly mysterious that’s it, this note starts with installation.

1.Remove the old version (skip if docker is not already installed)

1
2
3
4
5
6
7
8
9
$ sudo yum remove docker \

docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine

2.Get the installation repository and install

1
2
3
4
5
6
7
$ sudo yum install -y yum-utils

$ sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo

$ sudo yum install docker-ce docker-ce-cli containerd.io

3.Modify the default storage path (data stores are handled separately)

1
2
3
4
5
6
7
$ vim /usr/lib/systemd/system/docker.service

ExecStart后追加修改为--graph /Data/docker-data

ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --graph /Data/docker-data

$ systemctl daemon-reload

4.Launch docker and add boot

1
2
3
$ sudo systemctl start docker

$ sudo systemctl enable docker.service

5.Test run after installation

1
$ sudo docker run hello-world

At this point, docker is installed

6.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 if 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 techniques 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.
  • The last sentence, it’s over, don’t instigate.

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 !