kubernetes centos 安装
1. 安装
yum install -y etcd kubernetes
2. 配置
docker
/etc/sysconfig/docker
OPTIONS='--selinux-enabled=false
kubernetes
KUBE_ADMISSION_CONTROL="-- admission_control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota"
移除
ServiceAccount
KUBE_ADMISSION_CONTROL="--admission_control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ResourceQuota"
3. 启动服务
systemctl start etcd
systemctl start docker
systemctl start kube-apiserver
systemctl start kube-controller-manager
systemctl start kube-scheduler
systemctl start kubelet
systemctl start kube-proxy
4. redis的例子
参考地址:
https://github.com/kubernetes/kubernetes/tree/master/examples/guestbook
5. 命令
kubectl get .create delete