k8s 集群 搭建过程问题汇总
k8s 集群 搭建过程问题汇总
·
1. 为k8s集群添加内网域名
修改core-dns 的configmap ,添加hosts
{
"Corefile": ".:53 {
errors
health {
lameduck 5s
}
ready
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
ttl 30
}
hosts {
10.210.13.28 registry.gitlab.caicongyang.com
10.210.13.28 kas.gitlab.caicongyang.com
10.210.13.28 minio.gitlab.caicongyang.com
10.210.13.28 gitlab.gitlab.caicongyang.com
10.210.13.28 kas.gitlab.caicongyang.com
10.210.13.28 minio.gitlab.caicongyang.com
10.210.13.28 registry.gitlab.caicongyang.com
10.210.13.28 gitlab.gitlab.caicongyang.com
fallthrough
}
prometheus :9153
forward . /etc/resolv.conf {
max_concurrent 1000
}
cache 30
loop
reload
loadbalance
}
"
}
2. 修改apiserver server端口号,支持NodePort 指向80
修改master 节点 vim /etc/kubernetes/manifests/kube-apiserver.yaml
- --service-node-port-range=1-65535
然后记得重启 (此处我是kubeadmin 安装的k8s 集群)
kubectl delete pod -n kube-system kube-apiserver-xxxxx
删除pod 完后,会自动重启
更多推荐
已为社区贡献3条内容
所有评论(0)