1 min read

[k8s] resource and cost optimisation with kube-green

Gone are the days when we had our applications always up&running. Cloud providers gave us a lot of elasticity, but without a mind change all this magic world will soon become a hell.
[k8s] resource and cost optimisation with kube-green

There's no reason anymore to leave our development workloads running also during off hours.

Cloud providers gave us mainly elasticity, on the other hand to really take cloud advantages a mind change is needed.

What I mean? I mean for example, the FinOps practices mandatory to continue a cloud business innovation.

Firstly, why leave cloud resources running (and paying for them) if we can stop them?

Talking about Kubernetes, kube-green is a very interesting tool to allow automatic shutdown of deployments during off hours.

apiVersion: kube-green.com/v1alpha1
kind: SleepInfo
metadata:
  name: working-hours
spec:
  weekdays: "1-5"
  sleepAt: "20:00"
  wakeUpAt: "08:00"
  timeZone: "Europe/Rome"
  suspendCronJobs: true
  excludeRef:
    - apiVersion: "apps/v1"
      kind:       Deployment
      name:       api-gateway

Example of kube-green CRD

This practices for example allow to put costs near to zero while using Kubernetes setup with autoscaling/totally managed (ex. GKE autopilot --> https://www.yuribacciarini.com/gcp-google-kubernetes-engine-autopilot/)

Read more here --> https://kube-green.dev

Tweets by YBacciarini