首页 / CENTOS / CentOS系列教程(九)
CentOS系列教程(九)
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了CentOS系列教程(九),小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含9831字,纯文字阅读大概需要15分钟。
内容图文
![CentOS系列教程(九)](/upload/InfoBanner/zyjiaocheng/940/56b8625cd98249729984f68682af3d4f.jpg)
本文是 kubernets集群实验的部署操作。
以下是操作过程:
安装docker
[root@localhost master]# yum -y update
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
docker-ce-stable | 3.5 kB 00:00:00
kubernetes | 1.4 kB 00:00:00
(1/3): docker-ce-stable/x86_64/updateinfo | 55 B 00:00:00
(2/3): docker-ce-stable/x86_64/primary_db | 41 kB 00:00:00
(3/3): kubernetes/primary | 66 kB 00:00:00
kubernetes 484/484
No packages marked for update
[root@localhost master]#
[root@localhost master]# yum install -y docker-ce-18.06.1.ce-3.el7
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
...........................................................................................
Complete!
[root@localhost master]# systemctl enable docker && systemctl start docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@localhost master]#
[root@localhost master]# docker --version
Docker version 18.06.1-ce, build e68fc7a
[root@localhost master]#
[root@localhost master]# docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 18.06.1-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-862.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.779GiB
Name: kubernetes-master
ID: 5AUK:3LA6:CX2R:3GIU:HHEN:LJQ6:LKEA:QIJY:KJIC:VCIL:AESJ:YBH7
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
[root@localhost master]#
[root@localhost work0]# yum -y update
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
docker-ce-stable | 3.5 kB 00:00:00
kubernetes | 1.4 kB 00:00:00
(1/3): docker-ce-stable/x86_64/primary_db | 41 kB 00:00:00
(2/3): docker-ce-stable/x86_64/updateinfo | 55 B 00:00:00
(3/3): kubernetes/primary | 66 kB 00:00:00
kubernetes 484/484
No packages marked for update
[root@localhost work0]#
[root@localhost work0]# yum install -y docker-ce-18.06.1.ce-3.el7
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
.......................................................................................
Complete!
[root@localhost work0]# systemctl enable docker && systemctl start docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@localhost work0]# docker --version
Docker version 18.06.1-ce, build e68fc7a
[root@localhost work0]#
[root@localhost work0]# docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 18.06.1-ce
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-862.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.779GiB
Name: kubernetes-node00
ID: PSXR:XYKM:ONZ3:PLNS:G5LW:WIHH:YT47:RTSG:2L4Z:QHC4:5KSE:6GBX
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
[root@localhost work0]#
[root@localhost work1]# yum -y update
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
docker-ce-stable | 3.5 kB 00:00:00
kubernetes | 1.4 kB 00:00:00
(1/3): docker-ce-stable/x86_64/updateinfo | 55 B 00:00:00
(2/3): docker-ce-stable/x86_64/primary_db | 41 kB 00:00:00
(3/3): kubernetes/primary | 66 kB 00:00:00
kubernetes 484/484
No packages marked for update
[root@localhost work1]#
[root@localhost work1]# yum install -y docker-ce-18.06.1.ce-3.el7
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
...........................................................................................
Complete!
[root@localhost work1]# systemctl enable docker && systemctl start docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@localhost work1]# docker --version
Docker version 18.06.1-ce, build e68fc7a
[root@localhost work1]#
[root@localhost work1]# docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 18.06.1-ce
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-862.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.779GiB
Name: kubernetes-node01
ID: KAVQ:EEUQ:NXGC:Y6UJ:5GQ6:56ZU:5BJZ:PKDX:L7R5:PECV:4KMR:PXD4
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
[root@localhost work1]#
###########################################################
安装kubeadm,kubelet和kubectl
[root@localhost master]# yum install -y kubelet-1.15.0 kubeadm-1.15.0 kubectl-1.15.0
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
...............................................................................
Complete!
[root@localhost master]# systemctl enable kubelet
Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.
[root@localhost master]#
[root@localhost master]# cat >> /etc/docker/daemon.json << EOF
{
"registry-mirrors": ["https://dlbpv56y.mirror.aliyuncs.com"]
}
EOF
[root@localhost master]# cat /etc/docker/daemon.json
{
"registry-mirrors": ["https://dlbpv56y.mirror.aliyuncs.com"]
}
[root@localhost master]#
[root@localhost work0]# yum install -y kubelet-1.15.0 kubeadm-1.15.0 kubectl-1.15.0
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
...................................................................................
Complete!
[root@localhost work0]# systemctl enable kubelet
Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.
[root@localhost work0]# cat >> /etc/docker/daemon.json << EOF
{
"registry-mirrors": ["https://dlbpv56y.mirror.aliyuncs.com"]
}
EOF
[root@localhost work0]# cat /etc/docker/daemon.json
{
"registry-mirrors": ["https://dlbpv56y.mirror.aliyuncs.com"]
}
[root@localhost work0]#
[root@localhost work1]# yum install -y kubelet-1.15.0 kubeadm-1.15.0 kubectl-1.15.0
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
........................................................................................
Complete!
[root@localhost work1]# systemctl enable kubelet
Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.
[root@localhost work1]# cat >> /etc/docker/daemon.json << EOF
{
"registry-mirrors": ["https://dlbpv56y.mirror.aliyuncs.com"]
}
EOF
[root@localhost work1]# cat /etc/docker/daemon.json
{
"registry-mirrors": ["https://dlbpv56y.mirror.aliyuncs.com"]
}
[root@localhost work1]#
孟伯,20200411
交流联系:微信 1807479153 ,QQ 1807479153
内容总结
以上是互联网集市为您收集整理的CentOS系列教程(九)全部内容,希望文章能够帮你解决CentOS系列教程(九)所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。