Azure Kunernetes Service AKS Flashcards
What is a cluster preset configuration when deploying a new ALS cluster?
A set of configuration templates optimised for a specific cost and performance targets. When deploying a new cluster you can use this as a base to get started.
What are the pricing tiers for AKS?
Free: only charged for network, storage and vm costs incurred by the cluster , with a maximum
Of around 10 nodes.
Standard: charged for kubernetes control plane and includes autoscaling up to around 5000 nodes.
What kubernetes automatic upgrade options are available?
- Enabled with patches
- Enabled with stable releases
- Enabled with rapid ( minor)
- enabled with node image ( don’t update kubernetes but update os)
What is the concept of node pools?
One K8s cluster can have multiple clusters, and different pools have different configurations/ sizes. Each agent pool is used and optimised for a specific type of user defined tasks or applications like back end, front end etc.
What are virtual instances/nodes and what is burstable scaling?
Burstable scaling uses azure virtual instances which are already inside ready state so they don’t need to be created and provisioned meaning extremely fast scaling up or out.
What is the kubernetes cli?
It is a cli used to interact with kubernetes clusters. It’s native.
What is kubenet?
Kubenet is a networking plugin for Kubernetes in Azure, providing a simpler implementation of networking for AKS clusters compared to Azure Container Networking Interface (CNI).
With KubeNet, each node in an AKS cluster is assigned a single IP address in the Azure virtual network, and pods on a node are assigned IP addresses from a logically separate address space. Pod-to-pod communication across nodes requires NAT (Network Address Translation), handled by the node’s IP. This approach can be more straightforward and easier to manage, especially for smaller or simpler deployments.
This can help set up
A smaller cluster more quickly but sacrifices some scaling and performance when compared with Azure CNI
What is the azure CNI?
Azure CNI (Container Networking Interface) is a plugin that integrates Azure Kubernetes Service (AKS) with Azure’s virtual network (VNet), providing each pod with an IP address from the VNet. This setup allows pods to communicate with each other, and with other services, directly across the VNet without needing NAT, offering improved network performance and simplifying network configuration for services requiring direct access to the network.
Can you load balance between cluster pods?
Yes
What are the network privacy settings available for new cluster deployment?
- enable private cluster
- set authorised ip ranges
- network policy (set policies for ingree and egress between pods)
How is virus control managed in AKS
Microsoft defender is activated by default
How can you use custom
Container images as part of your k8s deployments?
Connect optionally to azure container registry to store container images there and use them in new pod deployments
What is azure monitor ?
A centralised way to
Monitor azure resources. It can be configured to monitor your AKS cluster.
What is azure policy for AKS?
You are allowing azure policies to be translated and used to manage the kubernetes policies. This avoids having multiple different sources and mechanisms of policies.
How long does it take to deploy a simple AKS cluster?
Depends on many factors but in my test it was finished in less than 4 minutes
How do you communicate with the cluster?
Using the command line. You can use this button here from the interface of the AKS resource to open cloud shell (which opens as powershell) and then switch to bash in the top left of the cli window.
You then need to ‘az AKS get-credentials —resource-group newaks —name newaks’ to login to the targeted AKS cluster ( you may have many but you need one shell per cluster and that shell has to Haba the appropriate credentials).
You can then begin using the ‘kubectl’ cli tool to issue commands to your cluster.
How to list the available nodes using kubectl?
az AKS get-credentials —resource-group <RG> —name <AKS></AKS></RG>
kubectl get-nodes
How to deploy an app to an AKS cluster?
- press the create button on the AKS azure portal ui for the cluster (see image) for two either apply/create a kubernetes yaml file or create a starter application ( wizard which outputs a k8s yaml file which you can verify in the review yaml step ).
How to list the namespaces in an AKS cluster ?
az AKS get-credentials —resource-group <RG> —name <AKS></AKS></RG>
kubectl get namespaces
Note:
Namespaces are a way to organize clusters into virtual sub-clusters — they can be helpful when different teams or projects share a Kubernetes cluster. Any number of namespaces are supported within a cluster, each logically separated from others but with the ability to communicate with each other.
essentially, namespaces represent the applications your AKS cluster is running
How to list deployments in an AKS cluster?
az AKS get-credentials —resource-group <RG> —name <AKS></AKS></RG>
kubectl get deployments -n <namespace></namespace>
Note:
A Kubernetes Deployment is a resource object that provides declarative updates to applications. It enables administrators to describe the application’s life cycle, defining specific images, the desired number of pods, and more. essentially it is the act of updating your yaml file
How to list services in an AKS cluster?
az AKS get-credentials —resource-group <RG> —name <AKS></AKS></RG>
kubectl get services -n <namespace></namespace>
Note:
A Kubernetes service is a logical abstraction for a deployed group of pods in a cluster (which all perform the same function). Since pods are ephemeral, a service enables a group of pods, which provide specific functions (web services, image processing, etc.) to be assigned a name and unique IP address (clusterIP).
How to list nodes in an AKS cluster?
az AKS get-credentials —resource-group <RG> —name <AKS></AKS></RG>
kubectl get nodes -n <namespace></namespace>
Note:
A Kubernetes node is a logical collection of IT resources that runs workloads for one or more containers in a Kubernetes cluster. K8s creates the application containers automatically so nodes can be VMs themselves or standard hardware but nodes are not ephemeral.
Se
How to list pods in an AKS cluster?
az AKS get-credentials —resource-group <RG> —name <AKS></AKS></RG>
kubectl get pods -n <namespace></namespace>
Note:
A Kubernetes pod is a collection of one or more Linux® containers, and is the smallest unit of a Kubernetes application. Any given pod can be composed of multiple, tightly coupled containers (an advanced use case) or just a single container (a more common use case). Containers are grouped into Kubernetes pods in order to increase the intelligence of resource sharing. Pods are used because it allows k8s to share compute resources more intelligently between containers and across the various pods in the cluster.
What is the difference between nodes and pods?
Pods are like individual application instances and consist of one or more
Linux containers. Nodes are the machines that run these containers, and Cluster holds them all together.