Why Kubernetes NodePort Stops at 32767?

In Kubernetes, NodePort allows external traffic to access services via a specific port range, typically 30000-32767. But while starting at port 30000 makes sense because Kubernetes does not want to conflict with other ports of the host, I wondered why Kubernetes supports only 2767 NodePorts by default. After digging a little bit, I found that the value 32767 represents the maximum for a 15-bit unsigned integer. Limiting the range to 32767 was therefore chosen to ensure the compatibility with systems that may treat ports as signed integers. This prevents potential issues in networking software. ...

September 25, 2024 · 1 min · Polyedre

Packaging and Deploying Helm Charts with Guix

My daily job requires me to maintain multiple Helm Charts released to multiple Kubernetes Clusters. I’ve encountered mutiple limitations with Helm. The Go templating engine sometimes is not enough. The only functions available to Chart Helm maintainers have been added explicitely. You cannot add custom ones easily. The values.yaml file is great at reducing the interface between the Helm Chart maintainer and the users, but when an option is missing, the only ways are to fork or contribute a pull request, and this lead to complex values.yaml Chart like those of bitnami (1427 lines): https://github.com/bitnami/charts/blob/main/bitnami/argo-workflows/values.yaml. ...

April 1, 2024 · 4 min · Polyedre

Let's filter Prometheus metrics exposed by Softwares

This post discusses about the limit of Prometheus crawlers when a software exposes too much metrics, and provides a solution to limit the number of metrics exported by Softwares that cannot be modified. Sometimes you’re just crawling too much The number of metrics exported on the /metrics endpoint of a Software can impact the performances of Prometheus crawlers. There is at least two ways crawlers could fail to fetch metrics for a software. ...

October 19, 2023 · 4 min · Polyedre

Using multiple kubectl contexts at the same time

Kubernetes clusters rarely come alone. If you have access to at least one, in no time you’ll need to switch your kubectl context to access other clusters. But what if you need to access two clusters simultaneously? This is a problem I had multiple times per week (even per day) for a few months. When comparing two Kubernetes clusters, if often had to switch the kubectl context between each command. ...

July 15, 2023 · 2 min · Polyedre

Reduce Kube State Metrics's sample count by 45%

Kube State Metrics is a service that listen to the Kubernetes API server and generates metrics about the state of the resources (Pods, Deployments, Namespaces…). The metrics are exported on the HTTP endpoint /metrics on the listening port (default 8080). They are served as plaintext and can be crawled directly by Prometheus. For each Kubernetes resource, some metrics are available. For Pods for instance, the metrics listed in this file are available. This includes kube_pod_info and kube_pod_status_phase. ...

May 31, 2023 · 3 min · Polyedre