k8s应用-----入门实例

安装一个单机版的K8S

1、关闭防火墙firewalld
2、安装etcd和kubernetes
yum install -y etcd kubernetes(会自动安装docker)
3、修改配置文件
修改docker配置文docker
修改为
OPTIONS='--selinux-enabled=false --insecure-registry gcr.io'
修改kubernetes配置文件
vi /etc/kubernetes/apiserver
KUBE_ADMISSION_CONTROL参数中删除ServiceAccount
4、按顺序启动服务
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
检查状态
systemctl status etcd
systemctl status docker
systemctl status kube-apiserver
systemctl status kube-controller-manager
systemctl status kube-scheduler
systemctl status kubelet
systemctl status kube-proxy

一个单机版本的kuberneted就搭建完毕了

 

你可能感兴趣的