k8s1.5.2 HA lvs keepalived tomcat/jenkins/kubernetes-dashboard http https nginx haproxy 完成案例

10.30.30.116k8s-master-116apiserver、controller-manager、scheduler、etcd、flanneletcd、(apiserver无态) 可HA用nginx或haproxy代理,controller-manager、scheduler需选举出一个来  
10.30.30.117k8s-master-117apiserver、controller-manager、scheduler、etcd、flanneletcd、(apiserver无态) 可HA用nginx或haproxy代理,controller-manager、scheduler需选举出一个来  
10.30.30.118k8s-master-118apiserver、controller-manager、scheduler、etcd、flanneletcd、(apiserver无态) 可HA用nginx或haproxy代理,controller-manager、scheduler需选举出一个来  
10.30.30.119k8s-produce-119kubelet、proxy、flanneltomcat、jenkins等app  
10.30.30.131k8s-produce-131kubelet、proxy、flannelkubernetes-dashboard等app  
10.30.30.135k8s-ingress-135kubelet、proxy、flannel

default-backend.yaml

nginx-ingress-controller.yaml

jenkins-ingress.yml

service-nodeport.yaml

统一外网访问入口

  
10.30.30.128lvs-master-128(keepalived或ipvsadm亦或均装)、lvs[泛指内核模块lsmod|grep ip_vs]keepalived,lvs用来高可用haproxy的  
10.30.30.127lvs-slave-127(keepalived或ipvsadm亦或均装)、lvs[泛指内核模块lsmod|grep ip_vs]keepalived,lvs用来高可用haproxy的  
10.30.30.125haproxy-125haproxyhaproxy来代理 api-server和etcd  
10.30.30.126haproxy-126haproxyhaproxy来代理 api-server和etcd  
10.30.30.129nginx-129nginxnginx来代理 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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值