News & Events
K8s Anti-Design Pattern Series – Deployment Metrics
- February 24, 2023
- Posted by: Narendra
- Category: K8s Anti Design Patterns Technology
Introduction
Metrics have been brought up several times in the preceding bad practises. When we say “stats,” we’re really talking about these three things:
- logs – records that can be analyzed to learn more about what happened and what was requested (usually post-incident)
- Tracing means to investigate thoroughly the path taken by a single request (usually post-incident)
- metrics – incident detection measures (or even better to predict it)
Metrics
Because all services in a cluster are distributed, metrics in Kubernetes are more crucial than they are in conventional Virtual machines (especially if you use micro-services). Since apps deployed with Kubernetes are completely ephemeral (unlike virtual machines), understanding how they respond to changes in volume of traffic is crucial. As long as you have enough metrics for every use case, it doesn’t matter which precise solution you choose for your metrics.
- Instead of using kubectl, quickly obtaining vital information
- Learning the sources of the traffic entering your network and pinpointing the bottlenecks
- Evaluating and adjusting your capacity for use of resources
However, knowing whether or not your launch was successful is the most crucial use case. A programme is not necessarily running or accepting requests merely because its container is online.
Metrics aren’t something you should be looking at once in a while. You should incorporate metrics into every step of your distribution procedure. Several businesses use a workflow in which the metrics are inspected directly following a deployment, but this method is far from ideal. In terms of metrics, automation is key:
- Rollbacks can be performed automatically
- There is a rollout happening.
The deployment is either designated as complete or reverted after metrics are analyzed (and compared to a baseline).It’s important to realize that none of these processes require human intervention.It’s not simple to get your metrics to have an effect on your deployments. However, this demonstrates why metrics are so vital to Kubernetes deployments and what the ultimate objective is.