Skip to content

Latest commit

 

History

History
35 lines (18 loc) · 773 Bytes

README.md

File metadata and controls

35 lines (18 loc) · 773 Bytes

devops-k8s

For this Repo I'm doing a sample app in go to contairized and deploy K8s on GKE.

Step for CI/CD

1 - Write Dockerfile

2 - Docker build

3 - gcloud sdk

4 - docker push GCP

5 - gcloud container clusters create dev-ops-k8s --num-nodes=2

6 - gcloud compute instances list

7 - kubectl create deployment devops-web --image=gcloud container images list

8 - kubectl get pods

9 - kubectl expose deployment devops-web --type=LoadBalancer --port 80 --target-port 1337

10 - kubectl get service

11 - kubectl autoscale deployment devops-web --cpu-percent=50 --min=1 --max=3

12 - kubectl get hpa

For testing app

kubectl run -i --tty load-generator --image=busybox /bin/sh

while true; do wget -q -O- http://yout-ip-address; done