yum install -y yum-utils git etcd

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

yum makecache fast

yum install docker-ce -y

================================

配置私有仓库

[root@7dd70763-c067-6232-a90b-d6c1a9eef026 ~]# mkdir -p /etc/docker/certs.d/registry.bst-1.cns.bstjpc.com:5000
[root@7dd70763-c067-6232-a90b-d6c1a9eef026 ~]# vi /etc/docker/certs.d/registry.bst-1.cns.bstjpc.com:5000/domain.crt

 

vi /etc/hosts

109.105.30.84 registry.bst-1.cns.bstjpc.com

systemctl start docker

systemctl enable docker

=====================================

配置etcd 单节点

master 上

vi /etc/etcd/etcd.conf

 

#[Member]
#ETCD_CORS=""
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
#ETCD_WAL_DIR=""
#ETCD_LISTEN_PEER_URLS="http://localhost:2380"
ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379,http://0.0.0.0:4001"
#ETCD_MAX_SNAPSHOTS="5"
#ETCD_MAX_WALS="5"
ETCD_NAME="default"
#ETCD_SNAPSHOT_COUNT="100000"
#ETCD_HEARTBEAT_INTERVAL="100"
#ETCD_ELECTION_TIMEOUT="1000"
#ETCD_QUOTA_BACKEND_BYTES="0"
#
#[Clustering]
#ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380"
ETCD_ADVERTISE_CLIENT_URLS="http://0.0.0.0:2379,http://0.0.0.0:4001"

 

[root@7dd70763-c067-6232-a90b-d6c1a9eef026 k8s-auth]# systemctl start etcd
[root@7dd70763-c067-6232-a90b-d6c1a9eef026 k8s-auth]#
[root@7dd70763-c067-6232-a90b-d6c1a9eef026 k8s-auth]#
[root@7dd70763-c067-6232-a90b-d6c1a9eef026 k8s-auth]# systemctl enable etcd

====================================================================

配置 flanneld

etcdctl -C http://109.105.30.132:4001 set /coreos.com/network/config '{"Network":"10.254.0.0/16"}'