标签:star private info dex res 过程 img order ORC
Kubernetes+Docker的云平台在CentOS7系统上的安装
注意:选择Basic Server类型
安装过程略。
1)nmtui
1.
修改主机名:
nmcli general hostname slave1.smartmap.com
2.
修改网络连接
nmcli connection edit enp0s3
nmcli> goto ipv4
nmcli ipv4> set method manual
nmcli ipv4> set addresses 192.168.1.203/16
nmcli ipv4> set gateway 192.168.0.6
nmcli ipv4> set dns-search smartmap.com
nmcli ipv4> set dns 192.168.0.3 192.168.0.12
nmcli ipv4> back
nmcli> save
nmcli> goto connection
nmcli ipv4> set autoconnect true
nmcli ipv4> back
nmcli> save
nmcli> goto ipv4
nmcli> q
3.重启网卡
systemctl restart network.service
1)
vi /etc/sysconfig/selinux
修改SELINUX=enforcing为SELINUX=disabled
2)
reboot
systemctl stop firewalld.service
systemctl disable firewalld.service
reboot
Master主机上安装
Master主机上安装
yum install kubernetes etcd flannel
Slave机上安装
yum install kubernetes flannel
systemctl start docker.service
systemctl enable docker.service
docker pull centos
docker pull index.tenxcloud.com
docker pull index.tenxcloud.com/centos:latest
1)生成RSA证书
openssl genrsa -out /etc/kubernetes/service.key 2048
2)设定控制器的证书
vi /etc/kubernetes/controller-manager
KUBE_CONTROLLER_MANAGER_ARGS="--service_account_private_key_file=/etc/kubernetes/service.key"
3)设定APIServer的配置
vi /etc/kubernetes/apiserver
KUBE_API_ADDRESS="--address=0.0.0.0"
KUBE_ETCD_SERVERS="--etcd_servers=http://192.168.1.201:2379"
KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16"
KUBE_API_ARGS="--service_account_key_file=/etc/kubernetes/service.key"
4)设定master(管理节点)的配置
vi /etc/kubernetes/config
KUBE_MASTER="--master=http://192.168.1.201:8080"
vi /etc/etcd/etcd.conf
ETCD_LISTEN_PEER_URLS="http://192.168.1.201:2380,http://localhost:2380"
ETCD_LISTEN_CLIENT_URLS="http://192.168.1.201:2379,http://localhost:2379"
systemctl start etcd kube-apiserver kube-controller-manager kube-scheduler
systemctl enable etcd kube-apiserver kube-controller-manager kube-scheduler
1)创建配置信息
vi flannel-config.json
{
"Network":"172.16.0.0/16",
"SubnetLen":24,
"Backend":{
"Type":"vxlan",
"VNI":1
}
}
2)配置文件
vi /etc/sysconfig/flanneld
FLANNEL_ETCD="http://192.168.1.201:2379"
3)将Flannel的配置信息写入ETCD服务中
etcdctl set atomic.io/network/config < flannel-config.json
systemctl start flanneld
systemctl enable flanneld
Kubernetes+Docker的云平台在CentOS7系统上的安装
标签:star private info dex res 过程 img order ORC
原文地址:https://www.cnblogs.com/gispathfinder/p/9535274.html