mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	Merge pull request #13964 from liguangbo/fix_make_ca_cert_proxy
Auto commit by PR queue bot
This commit is contained in:
		@@ -66,3 +66,8 @@ ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Optional: Enable setting flags for kube-apiserver to turn on behavior in active-dev
 | 
					# Optional: Enable setting flags for kube-apiserver to turn on behavior in active-dev
 | 
				
			||||||
#RUNTIME_CONFIG=""
 | 
					#RUNTIME_CONFIG=""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Optional: Add http or https proxy when download easy-rsa.
 | 
				
			||||||
 | 
					# Add envitonment variable separated with blank space like "http_proxy=http://10.x.x.x:8080 https_proxy=https://10.x.x.x:8443"
 | 
				
			||||||
 | 
					PROXY_SETTING=${PROXY_SETTING:-""}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -347,7 +347,7 @@ function provision-master() {
 | 
				
			|||||||
                            create-flanneld-opts "127.0.0.1"; \
 | 
					                            create-flanneld-opts "127.0.0.1"; \
 | 
				
			||||||
                            sudo -p '[sudo] password to start master: ' cp ~/kube/default/* /etc/default/ && sudo cp ~/kube/init_conf/* /etc/init/ && sudo cp ~/kube/init_scripts/* /etc/init.d/ ;\
 | 
					                            sudo -p '[sudo] password to start master: ' cp ~/kube/default/* /etc/default/ && sudo cp ~/kube/init_conf/* /etc/init/ && sudo cp ~/kube/init_scripts/* /etc/init.d/ ;\
 | 
				
			||||||
                            sudo groupadd -f -r kube-cert; \
 | 
					                            sudo groupadd -f -r kube-cert; \
 | 
				
			||||||
                            sudo ~/kube/make-ca-cert.sh ${MASTER_IP} IP:${MASTER_IP},IP:${SERVICE_CLUSTER_IP_RANGE%.*}.1,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.cluster.local; \
 | 
					                            ${PROXY_SETTING} sudo -E ~/kube/make-ca-cert.sh ${MASTER_IP} IP:${MASTER_IP},IP:${SERVICE_CLUSTER_IP_RANGE%.*}.1,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.cluster.local; \
 | 
				
			||||||
                            sudo mkdir -p /opt/bin/ && sudo cp ~/kube/master/* /opt/bin/; \
 | 
					                            sudo mkdir -p /opt/bin/ && sudo cp ~/kube/master/* /opt/bin/; \
 | 
				
			||||||
                            sudo service etcd start; \
 | 
					                            sudo service etcd start; \
 | 
				
			||||||
                            sudo FLANNEL_NET=${FLANNEL_NET} -b ~/kube/reconfDocker.sh "a";"
 | 
					                            sudo FLANNEL_NET=${FLANNEL_NET} -b ~/kube/reconfDocker.sh "a";"
 | 
				
			||||||
@@ -392,7 +392,7 @@ function provision-masterandminion() {
 | 
				
			|||||||
                            create-flanneld-opts "127.0.0.1"; \
 | 
					                            create-flanneld-opts "127.0.0.1"; \
 | 
				
			||||||
                            sudo -p '[sudo] password to start master: ' cp ~/kube/default/* /etc/default/ && sudo cp ~/kube/init_conf/* /etc/init/ && sudo cp ~/kube/init_scripts/* /etc/init.d/ ; \
 | 
					                            sudo -p '[sudo] password to start master: ' cp ~/kube/default/* /etc/default/ && sudo cp ~/kube/init_conf/* /etc/init/ && sudo cp ~/kube/init_scripts/* /etc/init.d/ ; \
 | 
				
			||||||
                            sudo groupadd -f -r kube-cert; \
 | 
					                            sudo groupadd -f -r kube-cert; \
 | 
				
			||||||
                            sudo ~/kube/make-ca-cert.sh ${MASTER_IP} IP:${MASTER_IP},IP:${SERVICE_CLUSTER_IP_RANGE%.*}.1,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.cluster.local; \
 | 
					                            ${PROXY_SETTING} sudo -E ~/kube/make-ca-cert.sh ${MASTER_IP} IP:${MASTER_IP},IP:${SERVICE_CLUSTER_IP_RANGE%.*}.1,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.cluster.local; \
 | 
				
			||||||
                            sudo mkdir -p /opt/bin/ && sudo cp ~/kube/master/* /opt/bin/ && sudo cp ~/kube/minion/* /opt/bin/; \
 | 
					                            sudo mkdir -p /opt/bin/ && sudo cp ~/kube/master/* /opt/bin/ && sudo cp ~/kube/minion/* /opt/bin/; \
 | 
				
			||||||
                            sudo service etcd start; \
 | 
					                            sudo service etcd start; \
 | 
				
			||||||
                            sudo FLANNEL_NET=${FLANNEL_NET} -b ~/kube/reconfDocker.sh "ai";"
 | 
					                            sudo FLANNEL_NET=${FLANNEL_NET} -b ~/kube/reconfDocker.sh "ai";"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -54,8 +54,7 @@ work, which has been merge into this document.
 | 
				
			|||||||
## Prerequisites
 | 
					## Prerequisites
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1. The nodes have installed docker version 1.2+ and bridge-utils to manipulate linux bridge.
 | 
					1. The nodes have installed docker version 1.2+ and bridge-utils to manipulate linux bridge.
 | 
				
			||||||
2. All machines can communicate with each other, no need to connect Internet (should use
 | 
					2. All machines can communicate with each other. Master node needs to connect the Internet to download the necessary files, while working nodes do not.
 | 
				
			||||||
private docker registry in this case).
 | 
					 | 
				
			||||||
3. These guide is tested OK on Ubuntu 14.04 LTS 64bit server, but it can not work with
 | 
					3. These guide is tested OK on Ubuntu 14.04 LTS 64bit server, but it can not work with
 | 
				
			||||||
Ubuntu 15 which use systemd instead of upstart. We are working around fixing this.
 | 
					Ubuntu 15 which use systemd instead of upstart. We are working around fixing this.
 | 
				
			||||||
4. Dependencies of this guide: etcd-2.0.12, flannel-0.4.0, k8s-1.0.3, may work with higher versions.
 | 
					4. Dependencies of this guide: etcd-2.0.12, flannel-0.4.0, k8s-1.0.3, may work with higher versions.
 | 
				
			||||||
@@ -135,6 +134,10 @@ that conflicts with your own private network range.
 | 
				
			|||||||
The `FLANNEL_NET` variable defines the IP range used for flannel overlay network,
 | 
					The `FLANNEL_NET` variable defines the IP range used for flannel overlay network,
 | 
				
			||||||
should not conflict with above `SERVICE_CLUSTER_IP_RANGE`.
 | 
					should not conflict with above `SERVICE_CLUSTER_IP_RANGE`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Note:** When deploying, master needs to connect the Internet to download the necessary files. If your machines locate in a private network that need proxy setting to connect the Internet, you can set the config `PROXY_SETTING` in cluster/ubuntu/config-default.sh such as:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     PROXY_SETTING="http_proxy=http://server:port https_proxy=https://server:port"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
After all the above variables being set correctly, we can use following command in cluster/ directory to bring up the whole cluster.
 | 
					After all the above variables being set correctly, we can use following command in cluster/ directory to bring up the whole cluster.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
`$ KUBERNETES_PROVIDER=ubuntu ./kube-up.sh`
 | 
					`$ KUBERNETES_PROVIDER=ubuntu ./kube-up.sh`
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user