[k8s] resource and cost optimisation with kube-green
![[k8s] resource and cost optimisation with kube-green](/content/images/size/w960/2024/02/kube-green-logo-concept-53fdbdef8db6d0d563ce2f99d7209ce5.png)
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