-
Notifications
You must be signed in to change notification settings - Fork 0
/
reset_all.sh
25 lines (20 loc) · 1013 Bytes
/
reset_all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#run this on master node
# sh reset_all.sh "cloudflare api token" "aws id" "aws secret"
#create RBAC for traefik
kubectl apply -f https://raw.githubusercontent.com/containous/traefik/v1.7/examples/k8s/traefik-rbac.yaml
#setup secets and deploy traefik
echo -n '[email protected]' > /home/pi/username.txt
echo -n $1 > /home/pi/api_token.txt
echo -n $2 > /home/pi/aws_key.txt
echo -n $3 > /home/pi/aws_key_access.txt
kubectl create secret generic cloudfare-dns --from-file=/home/pi/username.txt --from-file=/home/pi/api_token.txt
kubectl create secret generic aws --from-file=/home/pi/aws_key.txt --from-file=/home/pi/aws_key_access.txt
kubectl apply -f traefik_deamon.yaml
kubectl apply -f traefik_service.yaml
kubectl apply -f traefik_config.yaml
#deploy maetallb
kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.8.1/manifests/metallb.yaml
kubectl apply -f metallb_config.yaml
kubectl apply -f deployments.yaml
kubectl apply -f deployment_service.yaml
kubectl apply -f ingress.yaml