10.30.30.116 | k8s-master-116 | apiserver、controller-manager、scheduler、etcd、flannel | etcd、(apiserver无态) 可HA用nginx或haproxy代理,controller-manager、scheduler需选举出一个来 | ||
10.30.30.117 | k8s-master-117 | apiserver、controller-manager、scheduler、etcd、flannel | etcd、(apiserver无态) 可HA用nginx或haproxy代理,controller-manager、scheduler需选举出一个来 | ||
10.30.30.118 | k8s-master-118 | apiserver、controller-manager、scheduler、etcd、flannel | etcd、(apiserver无态) 可HA用nginx或haproxy代理,controller-manager、scheduler需选举出一个来 | ||
10.30.30.119 | k8s-produce-119 | kubelet、proxy、flannel | tomcat、jenkins等app | ||
10.30.30.131 | k8s-produce-131 | kubelet、proxy、flannel | kubernetes-dashboard等app | ||
10.30.30.135 | k8s-ingress-135 | kubelet、proxy、flannel | default-backend.yaml nginx-ingress-controller.yaml jenkins-ingress.yml service-nodeport.yaml 统一外网访问入口 | ||
10.30.30.128 | lvs-master-128 | (keepalived或ipvsadm亦或均装)、lvs[泛指内核模块lsmod|grep ip_vs] | keepalived,lvs用来高可用haproxy的 | ||
10.30.30.127 | lvs-slave-127 | (keepalived或ipvsadm亦或均装)、lvs[泛指内核模块lsmod|grep ip_vs] | keepalived,lvs用来高可用haproxy的 | ||
10.30.30.125 | haproxy-125 | haproxy | haproxy来代理 api-server和etcd | ||
10.30.30.126 | haproxy-126 | haproxy | haproxy来代理 api-server和etcd | ||
10.30.30.129 | nginx-129 | nginx | nginx来代理 api-server和etcd。不同的代理软件和haproxy类似 |
lvs-master-128:
1、yum install keepalived ipvsadm -y
2、keepalived和ipvsadm的使用和配置参考
https://blog.csdn.net/Michaelwubo/article/details/95214504
https://blog.csdn.net/Michaelwubo/article/details/95060721
haproxy-125/haproxy-126
1、yum install haproxy
2、haproxy配置和使用参考
https://blog.csdn.net/Michaelwubo/article/details/95334852
nginx-129
1、yum install nginx
2、参考
https://blog.csdn.net/Michaelwubo/article/details/93741015
k8s-master-116、k8s-master-117、k8s-master-118
1、etcd集群安装
https://blog.csdn.net/Michaelwubo/article/details/92659986
2、apiserver、controller-manager、scheduler
https://blog.csdn.net/Michaelwubo/article/details/93464174
配置稍微改一下
cat config
[root@k8s-master-116 kubernetes]# cat config
###
# kubernetes system config
#
# The following values are used to configure various aspects of all
# kubernetes services, including
#
# kube-apiserver.service
# kube-controller-manager.service
# kube-scheduler.service
# kubelet.service
# kube-proxy.service
# logging to stderr means we get it in the systemd journal
KUBE_LOGTOSTDERR="--logtostderr=true"
# journal message level, 0 is debug
KUBE_LOG_LEVEL="--v=0"
# Should this cluster be allowed to run privileged docker containers
KUBE_ALLOW_PRIV="--allow-privileged=false"
#KUBE_ALLOW_PRIV="--allow-privileged=true"
# How the controller-manager, scheduler, and proxy find the apiserver
#KUBE_MASTER="--master=http://127.0.0.1:8080"
#KUBE_MASTER="--master=http://k8s-master-116:8080"
#KUBE_MASTER="--master=http://etcd:8080"
#KUBE_MASTER="--master=http://10.30.30.126" #nginx
#KUBE_MASTER="--master=http://10.30.30.125:9999" #haproxy
KUBE_MASTER="--master=http://10.30.30.201:9999" #lvs
k8s-produce-119、k8s-produce-131
1、kubelet
配置
[root@k8s-produce-119 kubernetes]# cat config
###
# kubernetes system config
#
# The following values are used to configure various aspects of all
# kubernetes services, including
#
# kube-apiserver.service
# kube-controller-manager.service
# kube-scheduler.service
# kubelet.service
# kube-proxy.service
# logging to stderr means we get it in the systemd journal
KUBE_LOGTOSTDERR="--logtostderr=true"
# journal message level, 0 is debug
KUBE_LOG_LEVEL="--v=0"
# Should this cluster be allowed to run privileged docker containers
KUBE_ALLOW_PRIV="--allow-privileged=false"
#KUBE_ALLOW_PRIV="--allow-privileged=true"
# How the controller-manager, scheduler, and proxy find the apiserver
#KUBE_MASTER="--master=http://127.0.0.1:8080"
#KUBE_MASTER="--master=http://etcd:8080"
#KUBE_MASTER="--master=http://10.30.30.126" #nginx
#KUBE_MASTER="--master=http://10.30.30.125:9999" #proxy
KUBE_MASTER="--master=http://10.30.30.201:9999" #lvs
[root@k8s-produce-119 kubernetes]# cat kubelet
###
# kubernetes kubelet (minion) config
# The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces)
#KUBELET_ADDRESS="--address=127.0.0.1"
KUBELET_ADDRESS="--address=0.0.0.0"
# The port for the info server to serve on
# KUBELET_PORT="--port=10250"
# You may leave this blank to use the actual hostname
#KUBELET_HOSTNAME="--hostname-override=127.0.0.1"
KUBELET_HOSTNAME="--hostname-override=k8s-produce-119"
# location of the api-server
#KUBELET_API_SERVER="--api-servers=http://127.0.0.1:8080"
#KUBELET_API_SERVER="--api-servers=http://etcd:8080"
#KUBELET_API_SERVER="--api-servers=http://10.30.30.126" #nginx
#KUBELET_API_SERVER="--api-servers=http://10.30.30.125:9999" #haproxy
KUBELET_API_SERVER="--api-servers=http://10.30.30.201:9999" #lvs
#KUBELET_API_SERVER="--api-servers=http://k8s-master-116:8080,http://k8s-master-117:8080,http://k8s-master-118:8080"
# pod infrastructure container
KUBELET_POD_INFRA_CONTAINER="--pod-infra-container-image=registry.access.redhat.com/rhel7/pod-infrastructure:latest"
# Add your own!
KUBELET_ARGS=""
k8s-ingress-135
1、参考
https://blog.csdn.net/Michaelwubo/article/details/88952264