5

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

参考


codecraft
11.9k 声望2k 粉丝

当一个代码的工匠回首往事时,不因虚度年华而悔恨,也不因碌碌无为而羞愧,这样,当他老的时候,可以很自豪告诉世人,我曾经将代码注入生命去打造互联网的浪潮之巅,那是个很疯狂的时代,我在一波波的浪潮上留下...