Kubernetes环境搭建on centos7.1

https://docs.docker.com/linux/
CentOS裸机安装
http://kubernetes.io/v1.1/docs/getting-started-guides/centos/centos_manual_config.html
依赖环境:
CentOS7.1
Docker 1.8.2
Kubernetes: 1.2.0
Golang: 1.4.2
etcd
两台机器:
centos-master 10.10.3.184
centos-minion 10.10.3.185

全是用yum方式安装
安装Docker、etcd、kubernates
yum update

配置virt7-docker-common-testing源
[virt7-docker-common-testing]
name=virt7-testing
baseurl=http://cbs.centos.org/repos/virt7-docker-common-testing/x86_64/os/
gpgcheck=0
yum -y install --enablerepo=virt7-docker-common-testing kubernetes
yum -y install etcd galang docker
 centos-master运行kubernetes三个组件:apiserver、scheduler、controller-manager,相关配置项也只涉及这三块。
for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler; do 
   
systemctl restart $SERVICES
    systemctl enable $SERVICES
    systemctl status $SERVICES 
done
centos-minion运行kubernetes的两个组件:proxy、kubelet。
需要配置/etc/kubernetes/config

###
# kubernetes system config
#
# The following values are used to configure various aspects of all
# kubernetes services, including
#
#   kube-apiserver.service
#   kube-controller-manager.service
#   kube-scheduler.service
#   kubelet.service
#   kube-proxy.service
# logging to stderr means we get it in the systemd journal
KUBE_LOGTOSTDERR="--logtostderr=true"

# journal message level, 0 is debug
KUBE_LOG_LEVEL="--v=0"

# Should this cluster be allowed to run privileged docker containers
KUBE_ALLOW_PRIV="--allow-privileged=false"

# How the controller-manager, scheduler, and proxy find the apiserver
KUBE_MASTER="--master=http://centos-master:8080"

# Comma separated list of nodes in the etcd cluster
KUBE_ETCD_SERVERS="--etcd-servers=http://localhost:2379"


for SERVICES in kube-proxy kubelet docker; do 
   
systemctl restart $SERVICES
    systemctl enable $SERVICES
    systemctl status $SERVICES 
done

你可能感兴趣的:(Kubernetes环境搭建on centos7.1)