kubernetes在centos7中安装

By | 2017年5月22日
目录
[隐藏]

本次安装是在CentOS Linux release 7.3.1611 (Core)最小化安装版本中实现。

1.关闭centos自带防火墙

[root@node5 ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@node5 ~]# systemctl stop firewalld

2.安装etcd和kubernetes软件(会自动安装docker)

[root@node5 ~]# yum install -y etcd kubernetes

3.安装好软件后,修改两个配置文件(其他配置文件使用系统默认配置即可)

docker配置文件为/etc/sysconfig/docker

#OPTIONS=’–selinux-enabled –log-driver=journald –signature-verification=false’
OPTIONS=’–selinux-enabled=false –insecure-registry gcr.io’

修改kubernetes的apiserver配置文件,/etc/kubernetes/apiserver,把–admission_control中的ServiceAccount删除。

KUBE_ADMISSION_CONTROL=”–admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ResourceQuota”

4.启动服务

systemctl start etcd
systemctl start docker
systemctl enable kube-apiserver
systemctl start kube-apiserver
systemctl status kube-apiserver.service
systemctl start kube-controller-manager
systemctl start kube-scheduler
systemctl start kubelet
systemctl start kube-proxy

 

 

 

 

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注