-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·46 lines (33 loc) · 1.32 KB
/
setup.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# sudo sysctl fs.inotify.max_user_instances=512
# Delete existing if any
kind delete cluster --name kind
# Create cluster prepared for an ingress controller
kind create cluster --config ./cluster.yaml
kubectl config current-context # should print kind-kind
# kubectl create ns maquette
# kubectl apply -f namespace.yml
# 6.2.5 installed
helm install redis dandydev/redis-ha -f redis-values.yaml \
--set sentinel.livenessProbe.periodSeconds=5 \
--set sentinel.livenessProbe.timeoutSeconds=5 \
--set redis.livenessProbe.periodSeconds=5 \
--set redis.livenessProbe.timeoutSeconds=5
# helm install redis -n maquette dandydev/redis-ha -f redis-values.yaml
# perhaps kubectl wait redis ?
# Install ingres-nginx
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
# Build application image
docker build -t shoutbox:latest ./shoutbox
# Load image into cluster
kind load docker-image shoutbox:latest
# Wait for ingress-nginx to be ready
kubectl wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=90s
# Deploy Kubernetes resources
# kubectl delete -f deployment.yaml
kubectl apply -f deployment.yaml
kubectl get pods # -n maquette
kubectl get pods -A # show coredns