centos7安装kubernetes

codecraft

centos7安装

systemctl disable firewalld
systemctl stop firewalld
yum install lvm2
yum install docker
yum install -y etcd kubernetes

修改DOCKER OPTIONS

vim /etc/sysconfig/docker
OPTIONS='--selinux-enabled=false --insecure-registry gcr.io'

修改k8s的配置

vim /etc/kubernetes/apiserver
-- 删除ServiceAccount
KUBE_ADMISSION_CONTROL="--admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota"

启动

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

​检查kube-apiserver

curl http://your-ip:8080/
{
  "paths": [
    "/api",
    "/api/v1",
    "/apis",
    "/healthz",
    "/healthz/ping",
    "/logs/",
    "/metrics",
    "/resetMetrics",
    "/swaggerapi/",
    "/version"
  ]
}

或者

kubectl get pods

web ui

http://localhost:8080/ui
如果没有安装,则参照kubernetes 安装配置 kube-ui_v3这篇文章来。

clipboard.png

按类型查看

clipboard.png

swagger-ui

http://your-ip:8080/swagger-ui/

clipboard.png

cAdvisor

http://your-ip:4194/containers/

clipboard.png

clipboard.png

clipboard.png

参考

阅读 5.8k

code-craft
spring boot , docker and so on 欢迎关注微信公众号: geek_luandun

当一个代码的工匠回首往事时,不因虚度年华而悔恨,也不因碌碌无为而羞愧,这样,当他老的时候,可以很...

11.6k 声望
1.9k 粉丝
0 条评论
你知道吗?

当一个代码的工匠回首往事时,不因虚度年华而悔恨,也不因碌碌无为而羞愧,这样,当他老的时候,可以很...

11.6k 声望
1.9k 粉丝
文章目录
宣传栏