-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcluster-setup.sh
More file actions
22 lines (18 loc) · 830 Bytes
/
cluster-setup.sh
File metadata and controls
22 lines (18 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# this script automatically sets up a one node all-in-one kubernetes cluster
# before running this script, make sure to use setup-docker.sh and setup-kubetools.sh
# to take care of required software
sudo yum install -y wget vim curl bash-completion
sudo kubeadm init --pod-network-cidr=10.10.0.0/16
mkdir ~/.kube
sudo cp -i /etc/kubernetes/admin.conf ~/.kube/config
sudo chown $(id -un):$(id -un) .kube/config
kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml
wget https://docs.projectcalico.org/manifests/custom-resources.yaml
sed -i -e s/192.168.0.0/10.10.0.0/g custom-resources.yaml
kubectl create -f custom-resources.yaml
echo waiting for calico pods to appear
sleep 120
kubectl get pods -n calico-system
kubectl taint nodes --all node-role.kubernetes.io/master-
kubectl get all