Giter VIP home page Giter VIP logo

private_aks_cluster_dns_options's Introduction

Azure Kubernetes Service or AKS

Azure Kubernetes Service (AKS) simplifies deploying a managed Kubernetes cluster in Azure by offloading the operational overhead to Azure. As a hosted Kubernetes service, Azure handles critical tasks, like health monitoring and maintenance. Since Kubernetes masters are managed by Azure, you only manage and maintain the agent nodes. Thus, AKS is free; you only pay for the agent nodes within your clusters, not for the masters.

Private AKS Clusters

In a private cluster, the control plane or API server has internal IP addresses that are defined in the RFC1918 - Address Allocation for Private Internet document. By using a private cluster, you can ensure network traffic between your API server and your node pools remains on the private network only.

Target audience

  • Infrastructure Engineer
  • Security Team
  • Kubernetes Administrator
  • Cloud Solution Architect

Create a Private AKS Cluster

The Template.bicep Azure Bicep template will help you automatically deploy an AKS cluster

You need to modify:

enablePrivateCluster: bool

Private AKS DNS options:

System assigned Private DNS Zone:

A private DNS zone is created automatically for you in the node resource group.

The name of the API server gets an A record in that DNS zone and the DNS zone is associated with the VNET that contains the cluster and off course the resources in the same VNET will know how to resolve the API server.

The cluster VNET contacts the API server using a private link deployed automatically

So if you want to manage the cluster you need to have a client with kubectl in the cluster's VNET

If your client is not on the VNET you can use the az aks invoke command. (AAD integration does not work)

alt image

No Private DNS Zone:

The cluster is deployed with a public DNS instead of a Private DNS Zone.

You still need the translation to the private IP of the API server but instead of using a Private DNS zone you use a Public FQDN. Microsoft creates a name that can be resolved by public DNS servers to the private IP of the API, this is transparent for the customers.

This is the simplest option if you do not want to managed private DNS.

Modify your .bicep as below to deploy a private AKS witha public FQDN

apiServerAccessprofile: {
  enbalePrivateCluster: true
  privateDNSZone: 'none'
  enablePrivateClusterPublicFQDN: true
}

Bring Your Own DNS:

With the custom DNS option, you cannot use any name you like. The Private DNS Zone has to be like: privatelink..azmk8s.io. For instance, if you deploy your AKS cluster in West Europe, the Private DNS Zone’s name should be privatelink.westeurope.azmk8s.io. There is an option to use a subdomain as well.

When you use the custom DNS option, you also need to use a user-assigned Managed Identity for the AKS control plane. To make the registration of the A record in the Private DNS Zone work, in addition to linking the Private DNS Zone to the virtual network, the managed identity needs the following roles (at least):

  • Private DNS Zone Contributor role on the Private DNS Zone
  • Network Contributor role on the virtual network used by AKS

alt image

Azure services and related products

  • Private Endpoint
  • Private Link
  • Kubernetes
  • Private DNS zone

Related references

private_aks_cluster_dns_options's People

Contributors

davidarayasanabria avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.