aks
AKS: Static Egress Gateway with Terraform
·748 words·4 mins
azure
kubernetes
aks
containers
terraform
Let’s learn how to create an AKS cluster and enable Static Egress Gateway with Terraform.
Static Egress Gateway in AKS provides a solution for configuring fixed source IP addresses for outbound traffic from your AKS workloads. This means you can use a specific range for egress traffic from specific workloads, whcih can be useful for scenarios like whitelisting IP addresses in a firewall.
AKS: Enabling NAP with Terraform
·425 words·2 mins
azure
kubernetes
aks
containers
terraform
Let’s learn how to create an AKS cluster and enable Node Autoprovisioning (NAP) with Terraform.
Note: Since at the time of writing NAP is a preview feature, we will use the azapi provider to enable it.
Creating an AKS cluster and enable Node Autoprovisioning (NAP) # Create a file called main.tf with the following contents:
Exploring AKS Automatic
·1209 words·6 mins
azure
kubernetes
aks
containers
Azure Kubernetes Service (AKS) Automatic is a new SKU that simplifies the management of your AKS clusters. With this SKU, Azure ensures that your cluster is production ready with built-in best practice and a great code to kubernetes experience.
Creating an AKS Automatic cluster # Creating an AKS cluster with the Automatic SKU is as simple as running the following Azure CLI command:
AKS: Login with Azure CLI and Workload Identity
·972 words·5 mins
azure
kubernetes
aks
terraform
azure cli
workload identity
aad
azure active directory
In this post I’ll show you how to setup Workload Identity in an AKS cluster using terraform and then deploy a pod with Azure CLI that you will use to login to Azure.
Long story short: once workload identity is configured and enabled, kubernetes will inject 3 environment variables needed to login with Azure CLI:
AKS: Simulate Spot Node Eviction
·732 words·4 mins
azure
kubernetes
aks
terraform
spot
When you deploy an Azure Kubernetes Service with a node pool composed by spot virtual machines, you are running a cluster with the risk of losing nodes based on the configuration you set.
Eviction may occur based on capacity or max price.
In this post I’ll show you how to deploy an AKS cluster with such configuration and simulate a node eviction. The exercise will help you understand the resiliency of your solution and how to query related events with log analytics.
AKS: Disable local accounts with Terraform
·833 words·4 mins
azure
kubernetes
aks
terraform
aad
azure active directory
When deploying an AKS cluster, even if you configure RBAC or AAD integration, local accounts will be enabled by default. This means that, given the right set of permitions, a user will be able to run the az get-credentials command with the --admin flag which will give you a non-audtibale access to the cluster.
AKS: Resize Private Volume Claim to expand a Managed Premium Disk
·428 words·3 mins
azure
kubernetes
aks
persistent volume claim
managed disk
If you deployed a private volume claim using the managed-premium storage class, then ran out of space and now you are searching how to expand the disk to a larger disk, this is how you can do it from scratch:
manage-premium storage class is a premium storage class that allows volume expansion: allowVolumeExpansion: true.
AKS: Open Service Mesh Traffic Access Control
·799 words·4 mins
azure
kubernetes
aks
osm
In my previous post AKS: Open Service Mesh & mTLS, I described how to deploy an AKS cluster with Open Service Mesh enabled, and how:
Easy is to onboard applications onto the mesh by enabling automatic sidecar injection of Envoy proxy. OSM enables secure service to service communication. This time I’ll show you that Open Service Mesh (OSM) also provides a nice feature for controlling traffic between microservices: Traffic Access Control based on the SMI specifications.
AKS: Open Service Mesh & mTLS
·840 words·4 mins
azure
kubernetes
aks
osm
Open Service Mesh (OSM) is a lightweight and extensible cloud native service mesh, easy to install and configure and with features as mTLS to secure your microservice environments.
Now that Open Service Mesh (OSM) integration with Azure Kubernetes Service (AKS) is GA (Check the announcement) I’ll show you not only to deploy it but also how to add your microservices to the mesh so communication between them is encrypted.
AKS: High Available Storage with Rook and Ceph
·1681 words·8 mins
azure
kubernetes
aks
rook
ceph
storage
Disclaimer: this is just a Proof of Concept.
If you deploy Azure Kubernetes Service clusters with availability zones, you’ll probaly need a high available storage solution.
In such situation you may use Azure Files as an external storage solution. But what if you need something that performs better? Or something running inside your cluster?
AKS: Container Insights Pod Requests and Limits
·602 words·3 mins
azure
kubernetes
aks
azure monitor
log analytics
container insights
Today I’ll show you how to use Container Insights and Azure Monitor to check your AKS cluster for pods without requests and limits.
You’ll need to use the following tables and fields:
KubePodInventory: Table that stores kubernetes cluster’s Pod & container information ClusterName: ID of the kubernetes cluster from which the event was sourced Computer: Computer/node name in the cluster that has this pod/container. Namespace: Kubernetes Namespace for the pod/container ContainerName:This is in poduid/containername format. Perf: Performance counters from Windows and Linux agents that provide insight into the performance of hardware components operating systems and applications. ObjectName: Name of the performance object. CounterName: Name of the performance counter. CounterValue: The value of the counter And take a close look at the following Objects and Counters:
AKS: Persistent Volume Claim with an Azure File Storage protected with a Private Endpoint
·853 words·5 mins
kubernetes
azure
aks
persistent volume claim
azure files
private endpoint
This post will show you the steps you’ll have to take to deploy an Azure Files Storage with a Private Endpoint and use it to create volumes for an Azure Kubernetes Service cluster:
Create a bicep file to declare the Azure resources # You’ll have to declare the following resources:
Plan IP addressing for AKS configured with Azure CNI Networking
·328 words·2 mins
kubernetes
azure
aks
container network interface
cni
ip
When configuring Azure Kubernetes Service with Azure Container Network Interface (CNI), every pod gets an IP address of the subnet you’ve configured.
So how do you plan you address space? What factors should you consider?
Each node consumes one IP. Each pod consumes one IP. Each internal LoadBalancer Service you anticipate consumes one IP. Azure reserves 5 IP addresses within each subnet. The Max pods per node is 250. The Max pods per nodes lower limit is 10. 30 pods is the minimum per cluster. Max nodes per cluster is 1000. When a cluster is upgraded a new node is added as part of the process which requires a minimum of one additional block of IP addresses to be available. Your node count is then n + 1. When you scale a cluster an additional node is added. Your node count is then n + number-of-additional-scaled-nodes-you-anticipate + 1. With all that in mind the formula to calculate the number of IPs required for your cluster should look like this:
Deploy AKS + Kubecost with Terraform
·910 words·5 mins
azure
kubernetes
aks
terraform
kubecost
This morning I saw this tweet from Mr Brendan Burns:
AKS Cost Monitoring and Governance With Kubecost https://t.co/OStwIBsuPp
— brendandburns (@brendandburns) April 30, 2021 And I’m sure that once you also read through it, you’ll learn that you have to take several steps in order to achieve AKS Cost Monitoring and Governance With Kubecost.
MongoDB Enterprise Operator: Deploying MongoDB in AKS
·614 words·3 mins
kubernetes
azure
devops
aks
mongodb
a couple of weeks ago I was trying to deploy MongoDB in AKS using the MongoDB Enterprise Operator and had trouble finding a simple tutorial to make the thing work. This post intends to fill that gap with a straight to the point approach.
Prerequisites # Be sure to deploy AKS with a set of nodes with at least 8GB of RAM. I used Standard_D3_v2
AKS: Read Azure Key Vault secrets using AAD Pod Identity
·681 words·4 mins
azure
kubernetes
aks
azure key vault
pod identity
secrets
What if I tell you that it’s possible to connect you AKS pods to an Azure Key Vault using identities but without having to use credentials in an explicit way?
Well with AAD Pod Identities you can enable your Kubernetes applications to access Azure cloud resources securely using Azure Active Directory (AAD) including Azure Key Vault.
Kubernetes: Despliegue en Azure
·126 words·1 min
azure
kubernetes
aks
Durante el mes de Octubre tuve la suerte de grabar en LinkedIn Learning mi primer curso online sobre Kubernetes.
Aun me queda mucho por aprender y mejorar en este formato, ya que mientras grabas los cursos no recibes feedback inmediato como sà ocurre cuando das una charla o haces una presentación.
GitOps: Deploying apps in Azure Kubernetes Service (AKS) with Flux
·312 words·2 mins
azure
kubernetes
devops
git
gitops
aks
flux
Recently I learned about GitOps which is a way to manage your Kubernetes clusters and the applications you run on top using Git. The idea is that you can declaratively describe the desired state of your systems in Git and roll out changes as soon as merges occur.
You can immediately see the main benefits of such an approach: Your Git repositories become the single source of truth for both your infrastructure and application code, allowing the teams to increase productivity and stability (you get the Git log to audit changes).
Kured: Restart your Azure Kubernetes Service Nodes
·278 words·2 mins
azure
kubernetes
devops
aks
kured
Two weeks ago I got an email message from Microsoft Azure explaining that Azure Kubernetes Services had been patched but that I had to restart my nodes (reboot the clusters) to complete the operation.
The first thing you need to know is that, when things like this happens, the Azure platform creates a file called /var/run/reboot-required in each of the nodes of your cluster.
Webcast - Azure Summer Ask the Experts
azure
kubernetes
aks
microservices