Background:
Title, the company to deploy a set of this stuff, so look for some equipment deployment look good, I meanness, this article only to do a test reference, give, if have great God advice, can add my QQ, good, nonsense less say, start!
Approximate steps:
1 Environment Description and configuration
2 Installing the ETCD cluster
3 Installing k8s and configuring
4 Installing Nginxplus
5 Installing the Jenkins Cluster
1. Environmental statement
ip |
hostname |
role |
system |
172.18.1.6 |
k8s-node-1 |
etcd-maste R,k8s-master |
centos-7.2 |
172.18.1.7 |
k8s-node-2 |
etcd-slave,k8s-node |
|
172.18.1.8 |
k8s-node |
centos-7.2 |
172.18.1.9 |
K8s-node-4 |
K8s-node |
centos-7.2 |
Yum Environment Preparation (required for all four devices):
Replace the system Yum source with the Cheng Ari Yum source
Wget-o/etc/yum.repos.d/centos-base.repo Http://mirrors.aliyun.com/repo/Centos-7.repo
Deploying K8s's Yum Source
Cat <<EOF>/ETC/YUM.REPOS.D/KUBERNETES.REPO[MRITDREPO]NAME=MRITD repositorybaseurl=https://yum.mritd.me/ Centos/7/x86_64enabled=1gpgcheck=1gpgkey=https://cdn.mritd.me/keys/rpm.public.keyeof
Yum Clean all && yum Makecache
Cat/etc/hosts
172.18.1.6 k8s-node-1172.18.1.7 k8s-node-2172.18.1.8 k8s-node-3172.18.1.9 k8s-node-4
2. Installing the ETCD Cluster
2.1 K8s-node-1 operation (individual ports can be controlled by themselves)
Yum-y Install etcd# Create ETCD Data Modify configuration file,/etc/etcd/etcd.conf need to modify the following parameters: etcd_name=etcd1etcd_listen_peer_urls= "/http 172.18.1.6:2380 "etcd_listen_client_urls=" http://172.18.1.6:2379,http://127.0.0.1:2379 "Etcd_initial_advertise_ peer_urls= "http://172.18.1.6:2380" etcd_initial_cluster= "etcd1=http://172.18.1.6:2380,etcd2=http:// 172.18.1.7:2380 "etcd_initial_cluster_state=" new "etcd_initial_cluster_token=" K8s-etcd-cluster "ETCD_ADVERTISE_ Client_urls= "http://172.18.1.6:2379"
2.2 K8s-node-2 operation
Yum-y Install etcd# Create ETCD Data Modify configuration file,/etc/etcd/etcd.conf need to modify the following parameters: etcd_name=etcd2etcd_listen_peer_urls= "/http 172.18.1.7:2380 "etcd_listen_client_urls=" http://172.18.1.7:2379,http://127.0.0.1:2379 "Etcd_initial_advertise_ peer_urls= "http://172.18.1.7:2380" etcd_initial_cluster= "etcd1=http://172.18.1.6:2380,etcd2=http:// 172.18.1.7:2380 "etcd_initial_cluster_state=" new "etcd_initial_cluster_token=" K8s-etcd-cluster "ETCD_ADVERTISE_ Client_urls= "http://172.18.1.7:2379"
2.3 K8s-node-1 and k8s-node-2 respectively open ETCD
Systemctl Start ETCD
Yum install-y socat kubelet kubeadm kubectl kubernetes-cni Docker
This article is from the "ohgenlong16300blog.com" blog, make sure to keep this source http://ohgenlong16300.blog.51cto.com/499130/1894339
Kubernetes 1.5 + nginxplus Load balancer + Jenkins cluster Combat (i)