DevOps

5 items

How to decrease workload in my Kubernetes cluster at night? (and save money 🤑)

As users of cloud resources, we are concerned by the cost of resources we use. The goal is to use the minimum required resource we need, everytime, and that’s why orchestrators are very useful.

Kubernetes with its automatic mechanismcs to scale (pods and nodes autoscaling) is very good for that. Here we will not take about how it works but how we can use this in concret use case to downscale easily when we don’t need resources more.

Read more →
Kubernetes Operator

Setup Grafana OnCall @Home

Hello visitor! I hope you are fine.

It’s nice to meet you here.

Oh, you are passionate about alerting? Like me! What a coincidence!

OK, I knew, you are here because of the title…

I’m so happy to share with you my passion. What to say to start… hum… did you hear about Grafana OnCall?!

Will it continue like this for long?

It’s totally awesome, let’s talk about it. Come on, take a lemonade and be prepare for the fun!

Read more →
grafana oncall

Jé pa l'temps #24 - Kubernetes's best practices

Improvements to become better

  • Do not give the same name to namespace between production and local environment, it could save your life if you do shit when making local things (e.g. replace production secret without you understand it). Use {{namespace}}-production for the production cluster should be a good idea, firstly because the name explicitly tell you what it is, secondly because I love the idea to have hard name to tap in production; difficulty prevents you from loving what you are doing and touching production thing is a very bad thing (but everyone makes it).

— — — — — — — — — — — — — — — — — — — — —

La série « Jé pa l’temps » est une série de tutoriels rapides en mode “prise de note” pour avoir une trace de tout ce dont je ne peux me rappeler et pourquoi pas le partager à d’autre. On va à l’essentiel, laissons les jolis pavés à d’autres sites comme medium… LOL !

Read more →
kubernetes k8s

Jé pa l'temps #20 - Aws CLI

Configuration

Credentials

aws configure set aws_access_key_id MY_ACCESS_KEY
aws configure set aws_secret_access_key MY_SECRET_KEY

Endpoint

pip install awscli-plugin-endpoint
aws configure set plugins.endpoint awscli_plugin_endpoint

Configuration’s file exemple (for Scaleway)

[default]
region = fr-par
s3 =
  endpoint_url = https://s3.fr-par.scw.cloud
  signature_version = s3v4
  max_concurrent_requests = 100
  max_queue_size = 1000
  multipart_threshold = 50MB
  # Edit the multipart_chunksize value according to the file sizes that you want to upload. The present configuration allows to upload files up to 10 GB (100 requests * 10MB). For example setting it to 5GB allows you to upload files up to 5TB.
  multipart_chunksize = 10MB
s3api =
  endpoint_url = https://s3.fr-par.scw.cloud 

— — — — — — — — — — — — — — — — — — — — —

La série « Jé pa l’temps » est une série de tutoriels rapides en mode “prise de note” pour avoir une trace de tout ce dont je ne peux me rappeler et pourquoi pas le partager à d’autre. On va à l’essentiel, laissons les jolis pavés à d’autres sites comme medium… LOL !

Read more →
AWS devOps

Jé pa l'temps #10 - Local development with k3d

What is k3d ?

k3d is a CLI tool that allows you to easily start and manage a k3s local cluster. k3s is a rancher’s project that provide a Kubernetes like cluster lighter with interested features for

https://github.com/rancher/k3d

Launch local cluster

k3d create -n myCluster

With a local registry

Using Tilt’s script, it launches a local registry to accelerate local development

curl https://raw.githubusercontent.com/tilt-dev/k3d-local-registry/master/k3d-with-registry.sh | bash /dev/stdin \
  -w 2 \
  -p "80:80" \
  -p "443:443" \
  --server-arg "--no-deploy=traefik"
  • -w: define the number of worker you want (k3s node).
  • -p: published port (like Docker) ! If you expose TCP/UDP port with traefik, you have to publish port to access it.
  • --no-deploy=traefik: option to do not deploy feature. It is useful to not deploy Traefik if you have your own ingress controller.

Storage

If you have issue with pvc, verify that storageClassName is not defined as default. Indeed, with k3s only local-path storage is allowed and default className prevent from using this.

Read more →
jplt adminsys