Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8s deployment strategies #106

Open
HarshadRanganathan opened this issue Sep 19, 2022 · 1 comment
Open

k8s deployment strategies #106

HarshadRanganathan opened this issue Sep 19, 2022 · 1 comment

Comments

@HarshadRanganathan
Copy link
Owner

HarshadRanganathan commented Sep 19, 2022

[1] Ensure a min replica of 2 for all critical apps

Reasoning – If one replica goes down for any reason, requests will still get served by the other replica

[2] Roll-out changes one pod at a time

Please add below config to both API and GraphQL deployment charts

apiVersion: apps/v1
kind: Deployment
spec:
  replicas: 2
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0

Note – This may not be a suitable configuration for some apps as depending on the number of replicas, this will increase the deployment time – however this configuration will ensure the existing volume handling is not impacted

[3] Do not set CPU limits as it may result in aggressive throttling causing performance issues if misconfigured. However, ensure correct CPU requests are set for your app.

e.g. Do not set below setting

resources:
   limits:
      cpu: 512m
@HarshadRanganathan
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant