centos7安裝kubernetes

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-apiserverhtml

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

或者linux

kubectl get pods

web ui

http://localhost:8080/ui
若是沒有安裝,則參照kubernetes 安裝配置 kube-ui_v3這篇文章來。git

clipboard.png

按類型查看github

clipboard.png

swagger-ui

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

clipboard.png

cAdvisor

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

clipboard.png

clipboard.png

clipboard.png

參考

相關文章
相關標籤/搜索