GithubHelp home page GithubHelp logo

eks-cronjob-to-patch-hpa's Introduction

eks-cronjob-to-patch-hpa

EKS cronjob to patch HPA

1. Install Metric server

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

# kubectl get deployment metrics-server -n kube-system
NAME             READY   UP-TO-DATE   AVAILABLE   AGE
metrics-server   0/1     1            0           26s

2. Install Deployment and Service for Nginx

# k apply -f nginx_deploy.yaml 
deployment.apps/nginx-deployment created

# k delete apply -f nginx-service.yaml 
error: when paths, URLs, or stdin is provided as input, you may not specify resource arguments as well

3. Install HPA for Nginx

# k apply -f hpa.yaml 
horizontalpodautoscaler.autoscaling/nginx-deployment configured

4. Install Cronjob for scale up (set time according to your current timezone.)

# k apply -f cronjob.yaml 
cronjob.batch/nginx-deployment-scale-up configured

# k get cronjob
NAME                                SCHEDULE     SUSPEND   ACTIVE   LAST SCHEDULE   AGE
nginx-deployment-scale-up           51 3 * * *   False     1        34s             45s


# k get pods
NAME                                       READY   STATUS      RESTARTS   AGE
nginx-deployment-9456bbbf9-jprnx           1/1     Running     0          4s
nginx-deployment-9456bbbf9-qzb88           1/1     Running     0          40m
nginx-deployment-scale-up-27479751-zrv84   0/1     Completed   0          6s

eks-cronjob-to-patch-hpa's People

Contributors

tushardashpute avatar

Stargazers

arun9theja avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.