K3S : Lightweight Kubernetes. 5 less than k8s.
Today, I will talk about a tool I discovered recently that I use a lot to create local Kubernetes environments : k3s k3s allow you to create local k8s cluster, and try your application deployments before pushing it to production. You can use the k3s quick start, or use the k3d binary to deploy a…
Kustomize
Since we have migrated all our application deployment to Kubernetes, we needed to automatize the deployment of each application for different environments (integration and production). By default kubectl files are not really customizable. That’s why we choose Kustomize to deploy our apps. And now Kustomize is part of kubectl binary. You can just put your…
Prometheus Alertmanager Grafana annotation
At work, I’ve deployed a Prometheus Stack to monitor our Kubernetes pods and nodes. Apps are exposing metrics on their /prometheus/metrics endpoint, then metrics are collected by Prometheus and stored into Prometheus + Thanos. Finally, we can use Grafana Prometheus data-source to create dashboards to see those metrics. Here is a schema of the architecture…
Kubernetes Deployment with Terraform
Terraform is a very powerfull tool for creating compute, network, storage ressource on every public cloud provider. It have a declarative language, so what you write is what you get. For example if you remove a compte server from your terraform config file, the next time you apply your configuration, the server will be destroyed.…
Ansible AWX in Kubernetes
AWX Since one year now, Red Hat open sourced Tower as AWX, the Web UI to deploy with Ansible. Awx allow you to manage all your Ansible projects, with inventories, encrypted credentials, playbooks, etc, in a great Web UI. For example, you can create in AWX multiple credentials which are encrypted into Awx database to…
How to migrate from ansible vault to hashicorp vault
Ansible Vault Today, all our project passwords are stored in ansible vault files, on file per environnement, stored in a « passwords » directory They are loaded at the beginning of the main playbook : — – hosts: all:!localhost any_errors_fatal: true gather_facts: true pre_tasks: – include_vars: password/password_{{ env }}.yml connection: local no_log: True tags: – password -…
Ansible Mitogen
Today I discovered a new ansible strategy module that increase ansible performance a lot : Ansible Mitogen. Mitogen is a python library for writing distributed self-replicating programs. You can read a great article about this here : https://sweetness.hmmz.org/2018-03-06-quadrupling-ansible-performance-with-mitogen.html After some benchmark, I confirm : Mitogen is very fast ! I’ve divised my deployment by 2…
Prometheus : Monitor docker services with grafana
Here is a little tutorial to setup Prometheus monitoring for a local docker daemon and host metrics with docker-compose and : prometheus node exporter for system metrics cadvisor for docker metrics First create a prometheus.yml config file like this : global: alerting: alertmanagers: – static_configs: – targets: # – alertmanager:9093 rule_files: # – « first_rules.yml » #…
Ansible 2.5 grafana modules
At work, we needed to automatize grafana installation and grafana provisionning (datasources, plugins and dashboards). So I’ve created 3 new ansible modules that will be released with the next version of ansible 2.5 The first module is grafana_datasource. If you have to create a lot of different datsources for your grafana instance in multiples…
Zabbix – Send alerts to Slack
Today I’ve configured my Zabbix Server to automatically send alerts to the #alerting channel of my slack team. To to this, you have to create un new Incoming WebHook in your slack Team. Click on your team, select App and Integration. Search for Incoming Webhook Click « Add a configuration » Configure the webhook with the default…