Kubeadm安装Kubernetes集群环境

2021-05-16 01:27

阅读:643

标签:x86_64   set   ble   yml   name   git   systemd   usr   redirect   

 

先设置主机名

hostnamectl set-hostname k8s-1

修改/etc/hosts文件

cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.105    k8s-1
192.168.0.106    k8s-2
192.168.0.107    k8s-3

修改网络配置成静态ip,然后

service network restart

安装docker

yum install docker

验证docker version

[root@k8s-master1 ~]# service docker start
Redirecting to /bin/systemctl start  docker.service
[root@k8s-master1 ~]# docker version
Client:
 Version:         1.12.6
 API version:     1.24
 Package version: docker-1.12.6-61.git85d7426.el7.centos.x86_64
 Go version:      go1.8.3
 Git commit:      85d7426/1.12.6
 Built:           Tue Oct 24 15:40:21 2017
 OS/Arch:         linux/amd64

Server:
 Version:         1.12.6
 API version:     1.24
 Package version: docker-1.12.6-61.git85d7426.el7.centos.x86_64
 Go version:      go1.8.3
 Git commit:      85d7426/1.12.6
 Built:           Tue Oct 24 15:40:21 2017
 OS/Arch:         linux/amd64

 

开机启动

[root@k8s-master1 ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@k8s-master1 ~]# systemctl start docker

 

Kubeadm安装Kubernetes集群环境

标签:x86_64   set   ble   yml   name   git   systemd   usr   redirect   

原文地址:http://www.cnblogs.com/ericnie/p/7749588.html


评论


亲,登录后才可以留言!