Created
January 15, 2021 18:47
-
-
Save burakodabas/01ff7e65b1cfb1ca4c4443fc5cea0b75 to your computer and use it in GitHub Desktop.
Kubernetes hint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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