Skip to content

Commit

Permalink
deployed to local kubernetes
Browse files Browse the repository at this point in the history
  • Loading branch information
ypapax committed Apr 17, 2018
1 parent 4565fdc commit 493fb5a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
7 changes: 7 additions & 0 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ svc:
kubectl get svc
watch:
kubectl get svc -w
start: # deployment in local kubernetes
kubectl create -f kubernetes_external_ip.yaml
replace:
kubectl replace -f kubernetes_external_ip.yaml --force # https://github.com/kubernetes/kubernetes/issues/11237#issuecomment-351419329
# to let local kubernetes pull images from google cloud registry: http://docs.heptio.com/content/private-registries/pr-gcr.html
delete:
kubectl delete -f kubernetes_external_ip.yaml
30 changes: 30 additions & 0 deletions backend/kubernetes_external_ip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: say-deployment
spec:
replicas: 3
template:
metadata:
labels:
app: say
spec:
containers:
- name: say
image: gcr.io/hazel-champion-200108/say
ports:
- containerPort: 8080
---
kind: Service
apiVersion: v1
metadata:
name: say-service
spec:
selector:
app: say
ports:
- protocol: TCP
port: 8080
type: LoadBalancer
externalIPs:
- 192.168.0.112
4 changes: 3 additions & 1 deletion say/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
sayclient:
go run main.go -b 35.195.180.190:8080 "human" && afplay output.wav
go run main.go -b 35.195.180.190:8080 "human" && afplay output.wav
saylocal:
go run main.go -b 192.168.0.112:8080 "hey mate, how are doing" && afplay output.wav

0 comments on commit 493fb5a

Please sign in to comment.