Thursday, 29 October 2026

Why Our Gateway Pods Failed 60 Days After a Deploy, and How We Fixed It

We have discussed ngix/gateway deployment on aks in the below posts.

Then we fixed an issue with cert renewal at deployment as explained in the below post.

The nginx gateway setup explained in above posts has two parts that talk to each other over a secure connection:

  • The control part (Fabric) sends configuration.
  • The traffic part (nginx pods) receives it and routes user traffic.

To trust each other, both use certificates. We use cert-manager to create and renew them. There are three certificates:

  1. A CA certificate. This is the "boss" certificate. It signs the other two.
  2. A server certificate for the control part.
  3. A client certificate for the nginx pods.

Saturday, 22 August 2026

Preventing Perpetual Diffs with Nested Blocks in Terraform Resources

 We may run into a situation where Terraform shows changes on every terraform plan, even though we have not changed our Terraform code. As an example, this can happen with nested service_endpoint blocks in an Azure subnet when the order in Terraform is different from the order returned by Azure. Terraform then thinks the resource has changed and shows an update on every plan. In this example, we can see how the problem looks and how changing the order of the blocks can fix the perpetual diff.


Saturday, 15 August 2026

Restore Given Index in Elastic Search to a Diffrent Index Name from a Snapshot

 In elastic (cloud or on self hosted in AKS) we can take snapshots of our indices. If we want to restore evrything we can do a full restore for a recovery. However, in a situation where we need to restore a single index into a diffrent name to prevent touching existing live index, but we need to recover some index documents previously was there in a given index (which are deleted as of now), we have the option of restoring a given index by a diffren t name.

Below is an example


Saturday, 8 August 2026

Enabling Prometheus Data Scraping for Nginx-Gateway Deployed in - AKS Setup with Managed Prometheus

 We have discussed how to setup Nginx-Gateway instead of Nginx ingress controller in AKS in previous posts listed in the bottom of this post. We have also looked at  "Setup Managed Prometheus for AKS via Terraform" and "Deploying Azure Managed Grafana with Terraform" . For Nginx-Gateway deployed in AKS, we need to enable datascraping so that we can start monitring nginx metrices from managed grafana. Let's look at the steps required.

The expectation is getting metrices ti managed grafana as shown below.


Saturday, 1 August 2026

Diagnosing Native Errors in .NET Apps Running in the Linux Containers (exit code 139) in AKS

 We might have to sometimes use native assembiles such Aspose.Slides.NET6.CrossPlatform as for specific needs.

 <PackageReference Include="Aspose.Slides.NET6.CrossPlatform" Version="26.9.0" />

However, when there is a native exception which is not propagating the exceptions to .NET app, but fails due to native errors and restart cotianers with exit code 139. 

Exit code 139 in a Linux container means the process was terminated due to a Segmentation Fault (SIGSEGV). The operating system killed the container because it attempted to access a memory location it wasn't allowed to touch. 

Linux calculates this exit code using the formula 128 + Signal Number. Because SIGSEGV is signal 11, the result is: (128+11=139)


Saturday, 25 July 2026

Setup Valkey (Open Source Redis) Prerequisites in AKS

 Valkey is the open source redis alternative. We have discussed getting AKS instance ready for Valkey in the post "Create AKS Cluster to Setup Valkey Cluster (Open Source Redis)". Let's look at the prerequisites for setting up Valkey.

First step is setting up a namespace for valkey in the AKS cluster.

# Namespace in aks_vnet for Valkey
---
apiVersion: v1
kind: Namespace
metadata:
  name: valkey
  labels:
    shared-gateway-access: "true"

Saturday, 18 July 2026

Identifying VM Sizes Available for AKS in a Given Azure Region

 We sometimes come across issues such as shown below while trying to deploy AKS clusters. It could be due to diffrent reasons. One such case is the below one where there is no availability for the VM size in zone 2 in the region but it has availability in other two regions.

performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with response: {

│   "code": "AvailabilityZoneNotSupported",

│   "details": null,

│   "message": "The zone(s) '2' for resource 'vkdefault' is not supported. The supported zones for location 'eastus2' are '1,3'",

│   "subcode": "",

│   "target": "agentPoolProfile.availabilityZone"

│  }


Saturday, 11 July 2026

Get Pod Counts via Kubectl in WSL

 It would be usefull to figure out how many pods running in a given AKS cluster sometimes for various diagnostic needs. In this post let's see how we can use kubectl command to get pod count in diffrent combinations.

Below are some examples.


Popular Posts