5 CLUSTER_IP=${1:-172.16.1.136} # Align with the value in our K8s setup script
7 # Install the Etcd Database
8 if [ "$(uname -m)" == 'aarch64' ]; then
9 ETCD_YAML=etcd-arm64.yaml
11 ETCD_YAML=etcd-amd64.yaml
14 SCRIPTS_DIR=$(dirname "${BASH_SOURCE[0]}")
16 sed -i "s/10.96.232.136/${CLUSTER_IP}/" "${SCRIPTS_DIR}/cni/calico/${ETCD_YAML}"
17 kubectl apply -f "${SCRIPTS_DIR}/cni/calico/${ETCD_YAML}"
19 # Install the RBAC Roles required for Calico
20 kubectl apply -f "${SCRIPTS_DIR}/cni/calico/rbac.yaml"
22 # Install Calico to system
23 sed -i "s/10.96.232.136/${CLUSTER_IP}/" "${SCRIPTS_DIR}/cni/calico/calico.yaml"
24 kubectl apply -f "${SCRIPTS_DIR}/cni/calico/calico.yaml"
26 # Remove the taints on master node
27 kubectl taint nodes --all node-role.kubernetes.io/master- || true