-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
30 lines (28 loc) · 1.01 KB
/
makefile
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
#docker exec -i -t 110bdf16efb5 /bin/bash
DEVSHELL_PROJECT_ID=conecktor
SERVER_NAME=test
deploy: cbuild kdeploy knodeport kapply
build:
docker build -t my-web-server .
run:
docker run -d -p 8080:80 my-web-server
cbuild:
gcloud builds submit -t gcr.io/$(DEVSHELL_PROJECT_ID)/$(SERVER_NAME)
cpush:
docker tag my-web-server gcr.io/$(DEVSHELL_PROJECT_ID)/$(SERVER_NAME)
docker images
gcloud docker -- push gcr.io/$(DEVSHELL_PROJECT_ID)/$(SERVER_NAME)
kdeploy:
kubectl run $(SERVER_NAME)-gke --image=gcr.io/$(DEVSHELL_PROJECT_ID)/$(SERVER_NAME) --port=8080
kloadbalancer:
kubectl expose deployment $(SERVER_NAME)-gke --type=LoadBalancer --port=80 --target-port=8080
kscale:
kubectl scale deployment $(SERVER_NAME)-gke --replicas=3
knodeport:
kubectl expose deployment $(SERVER_NAME)-gke --target-port=8080 --type=NodePort
kapply:
kubectl apply -f basic-ingress.yaml
cleanup:
kubectl delete ingress basic-ingress1
kubectl delete service $(SERVER_NAME)-gke
kubectl delete deployment $(SERVER_NAME)-gke