Code Review
/
eliot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CentOS Setup Master CleanUp Script
[eliot.git]
/
scripts
/
k8smaster.sh
diff --git
a/scripts/k8smaster.sh
b/scripts/k8smaster.sh
index
e13e662
..
49e72be
100644
(file)
--- a/
scripts/k8smaster.sh
+++ b/
scripts/k8smaster.sh
@@
-12,6
+12,9
@@
KUBE_VERSION=1.13.0-00
POD_NETWORK_CIDR=192.168.0.0/16
K8S_CNI_VERSION=0.6.0-00
POD_NETWORK_CIDR=192.168.0.0/16
K8S_CNI_VERSION=0.6.0-00
+#K8s service CIDR range
+K8s_SVC_CIDR=10.96.0.0/12
+
# Install Kubernetes with Kubeadm
# Disable swap
# Install Kubernetes with Kubeadm
# Disable swap
@@
-38,9
+41,11
@@
if ! kubectl get nodes; then
sudo kubeadm config images pull
sudo kubeadm init \
--apiserver-advertise-address="${MASTER_IP}" \
sudo kubeadm config images pull
sudo kubeadm init \
--apiserver-advertise-address="${MASTER_IP}" \
- --pod-network-cidr="${POD_NETWORK_CIDR}"
+ --pod-network-cidr="${POD_NETWORK_CIDR}" \
+ --service-cidr="${K8s_SVC_CIDR}"
if [ "$(id -u)" = 0 ]; then
if [ "$(id -u)" = 0 ]; then
+ KUBECONFIG=/etc/kubernetes/admin.conf
echo "export KUBECONFIG=/etc/kubernetes/admin.conf" | \
tee -a "${HOME}/.profile"
source "${HOME}/.profile"
echo "export KUBECONFIG=/etc/kubernetes/admin.conf" | \
tee -a "${HOME}/.profile"
source "${HOME}/.profile"