Yearly Archives: 2023

Prometheus: Building a Custom Prometheus Exporter in Python

25 February 2023
 

  Prometheus has many ready-to-use exporters, but sometimes you may need to collect your own metrics. For this, Prometheus provides client libraries that we can use to generate metrics with the necessary labels. Such an exporter can be included directly in the code of your application, or it can be run as a separate service that will poll… Read More »

GitLab: Helm chart of values, dependencies, and deployment in Kubernetes with AWS S3

4 February 2023
 

  We continue our engagement with GitLab and its deployment in Kubernetes. The first part – GitLab: Components, Architecture, Infrastructure, and Launching from the Helm Chart in Minikube, and now let’s get ready to deploy to AWS Elastic Kubernetes Service. What will we do and where: deploy to AWS from the Helm-chart, with some test env Kubernetes… Read More »

GitLab: Components, Architecture, Infrastructure, and Launching from the Helm Chart in Minikube

2 February 2023
 

  As GitLab recently changed the policy of providing free access, and now only 5 users will be available for the Free subscription, we decided to move to the self-hosted version. In general, they have interesting terms with the license: the price depends on the number of users, you can buy it for at least… Read More »

Kubernetes: Cluster Cost Monitoring – Kubernetes Resource Report and Kubecost

29 January 2023
 

  The very useful thing is to monitor how efficiently the cluster is being used, especially if applications are deployed by developers who do not delve into requests much and set inflated values ​​”in reserve”. A reserve, of course, is needed – but simply requesting resources is a bad idea. For example, you have a… Read More »

Kustomize: managing Kubernetes manifests – an overview, and examples

15 January 2023
 

 Kustomize is a configuration management tool for Kubernetes that allows you to use common sets of manifests that can be changed for each specific environment/cluster, and can be an alternative to (or complement) Helm templates. The general concept of Kustomize is “where, what, and how”: “where” is a base manifest, for example deployment.yaml “what” –… Read More »

BASH: using functions, with examples

15 January 2023
 

 This a translation of a post from 2013 with some edits, but still relevant for learning BASH. In fact, a function in bash is a regular variable, but with more features. The main use is when the same code needs to be used several times and/or in different related scripts. Declaring and calling a function The… Read More »

Grafana Loki: alerts from Ruler and labels from logs

7 January 2023
 

  For general information about Grafana Loki, see the Grafana Loki: architecture and running in Kubernetes with AWS S3 storage and boltdb-shipper post. Among other components of the Loki, there is a separate service called ruler that is responsible for working with alerts that can be generated directly from logs. The idea is very simple:… Read More »

Grafana Loki: architecture and running in Kubernetes with AWS S3 storage and boltdb-shipper

7 January 2023
 

  The last time I worked with Loki when it was still in Beta, and it looked much simpler then than it does now. In the new project, there is no logging system at all, and since we all love the Grafana stack, we also decided to use Loki for logging. Although to be honest,… Read More »