Skip to content

Instantly share code, notes, and snippets.

@burakodabas
Created January 15, 2021 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save burakodabas/01ff7e65b1cfb1ca4c4443fc5cea0b75 to your computer and use it in GitHub Desktop.
Save burakodabas/01ff7e65b1cfb1ca4c4443fc5cea0b75 to your computer and use it in GitHub Desktop.
Kubernetes hint
KUBERNETES ORDER
-> DOCKER
-> DEPLOYMENT
-> REPLICA
-> REPLICA SETTINGS FOR SCALE
docker build -t burakodabas/test-app .
docker push burakodabas/test-app .
kubectl create deployment --image burakodabas/test-app test-app
kubectl scale deployment test-app --replicas 3
kubectl expose deployment test-app --port 3000
kubectl edit service test-app
Replace port: 3000 with port: 80
Replace type: NodePort with type: LoadBalance
# for scaling
resources:
limits:
cpu: 1200m
memory: 512Mi
requests:
cpu: 700m
memory: 256Mi
#for reloading the application
kubectl set env deployment test-app DEPLOY_DATE="$(date)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment