AWS: Fargate – capabilities, comparison with Lambda/EC2 and usage with AWS EKS

7 May 2023
 

  AWS Fargate is another serverless solution from Amazon that takes over infrastructure management, saving the user the need to spend time configuring EC2 instances, operating systems, container management systems, etc. In general, when I was getting acquainted with Fargate, I found a great video from AWS re:Invent 2022, which very well explained (and showed)… Read More »

Kubernetes: vertical Pods scaling with Vertical Pod Autoscaler

1 May 2023
 

  In addition to the Horizontal Pod Autoscaler (HPA), which creates additional pods if the existing ones start using more CPU/Memory than configured in the HPA limits, there is also the Vertical Pod Autoscaler (VPA), which works according to a different scheme: instead of horizontal scaling, i.e. increasing the number of Pods, it changes resources.requests of a Pod,… Read More »

Prometheus: running Pushgateway on Kubernetes with Helm and Terraform

28 April 2023
 

  We have a lot of AWS Lambda functions in the project, and developers want to be able to send metrics to our Prometheus to add their own alerts and graphs in Grafana. For this, the functions use the Prometheus library, which allows these metrics to be created (see Prometheus: Building a Custom Prometheus Exporter… Read More »

GitLab: gitlab-shell timeouts, and /metrics Connection refused

25 April 2023
 

  After running our self-hosted GitLab in production, we faced a bug: during git clone/pull/push operations, the request sometimes hung for 1-2 minutes. It looked like some kind of “floating” bug, that is, it could normally work 5 times, and then hangs once. The issues gitlab-shell timeouts For example, one time git clone works well:… Read More »

AWS: security – Instance Metadata Service v1 vs IMDS v2, Kubernetes Pod and Docker containers

24 April 2023
 

  Instance metadata (IMDS – Instance Metadata Service) – data about an EC2 instance, such as information about AMI, IP, hostname, etc. You can also add User Data to Instance Metadata to store some parameters, which can then be retrieved inside the instance. See Instance metadata and user data and Instance metadata categories. From the beginning of the… Read More »

Knative: Serverless for Kubernetes – an overview and launch in Minikube

9 April 2023
 

  Knative is a system that allows you to use the Serverless development model in Kubernetes. In essence, Knative can be imagined as another level of abstraction that allows developers not to dive into the details of deployment, scaling, and networking in “vanilla” Kubernetes. The development of Knative itself was started at Google with the participation… Read More »

GitLab: monitoring – Prometheus, metrics, and Grafana dashboard

12 March 2023
 

 So, let’s continue our journey with migrating GitLab to Kubernetes. See previous parts: GitLab: Components, Architecture, Infrastructure, and Launching from the Helm Chart in Minikube GitLab: Helm chart of values, dependencies, and deployment in Kubernetes with AWS S3 GitLab: міграція даних з GitLab cloud та процес backup-restore у self-hosted версії в Kubernetes In general, everything is working,… Read More »

Grafana Loki: alerts from the Loki Ruler and labels from logs

12 March 2023
 

  For general information on Grafana Loki, see the Grafana Loki: architecture and running in Kubernetes with AWS S3 storage and boltdb-shipper. Among other services that make up 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 »

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 »