-->

DEVOPSZONES

  • Recent blogs

    Install AKS Cluster in 10 Minutes

    Install AKS Cluster in 10 Minutes

    Azure AKS

    In this article we'll learn How to set up an AKS cluster. AKS is the managed Kubernetes service provide by Microsoft Azure. As we all Know the  Kubernetes is an open-source container-orchestration system for automating application deployment, scaling, and management. It was originally designed by Google and is now maintained by the Cloud Native Computing Foundation. Microsoft has build a wrapper around it and providing it as a managed service. As this in cloud we do not need to invest in the upfront capex for building a service. So its going to be cheap. We'll create a AKS cluster and use it for our task and delete it when we are done. It'll charge us on pay as you go basis. 

    Kubernetes cluster architecture
    A Kubernetes cluster is divided into two components:


    • Control plane nodes provide the core Kubernetes services and orchestration of application workloads.
    • Nodes run your application workloads.

    Kubernetes control plane and node components


    Azure AKS


    Control plane
    When you create an AKS cluster, a control plane is automatically created and configured. This control plane is provided as a managed Azure resource abstracted from the user. There's no cost for the control plane, only the nodes that are part of the AKS cluster.

    The control plane includes the following core Kubernetes components:


    • kube-apiserver - The API server is how the underlying Kubernetes APIs are exposed. This component provides the interaction for management tools, such as kubectl or the Kubernetes dashboard.
    • etcd - To maintain the state of your Kubernetes cluster and configuration, the highly available etcd is a key value store within Kubernetes.
    • kube-scheduler - When you create or scale applications, the Scheduler determines what nodes can run the workload and starts them.
    • kube-controller-manager - The Controller Manager oversees a number of smaller Controllers that perform actions such as replicating pods and handling node operations.

    AKS provides a single-tenant control plane, with a dedicated API server, Scheduler, etc. You define the number and size of the nodes, and the Azure platform configures the secure communication between the control plane and nodes. Interaction with the control plane occurs through Kubernetes APIs, such as kubectl or the Kubernetes dashboard.


    This managed control plane means that you don't need to configure components like a highly available etcd store, but it also means that you can't access the control plane directly. Upgrades to Kubernetes are orchestrated through the Azure CLI or Azure portal, which upgrades the control plane and then the nodes. To troubleshoot possible issues, you can review the control plane logs through Azure Monitor logs.

    So lets go ahead and create one. 

    1. login to Azure portal
    2. In Home page search for Kubernetes service.

    3. Now Click on "Add" and choose "Add Kubernetes cluster".



    4. In the "Create Kubernetes Cluster" Wizard create a Resource Group or select an Existing Resource Group.
    AKS


    5. Give the "Cluster Details" like "Cluster name", Location and Kubernetes version.




    6. In the "Primary Node Pool" section choose node type and provide Cluster Size. We have kept default node type and  Size as 2.


    6. Next go to "Node pool" and leave it as default setting, Unless you want to explicitly Change Scaling settings.

    7. Next go to Authentication and create a Service Principal or Use the Default Service Principal. Leave RBAC as Enabled.




    8. Next Choose Networking option. By default it is "Basic". Choose "Advanced" if you want more Control Over the IP ranges and network policy.
    Give  a DNS name Prefix. I've Chosen Basic for this Demo.




    9. Leave integrations As it is.
    10. In the "TAG" tab you add tags to your Cluster.
    11. The next section is For "Review+create". It'll display all the Configuration that we have created So far. If you want to change anything you can do that so. Once you are OK with the Configuration, Click on "Create" to create deployment. It'll take around 10 minutes for Deployment for Our Cluster. The Deployment time largely depends on how many nodes you have in Cluster.




    12. Check the Deployment Status.



    13. Once your deployment is completed,  we now have to access the Cluster and Check our Cluster.




    14. Access azure Cloud Shell and Choose your Terminal Either BASH or Powershell. For this demo We have Chosen Powershell.




    15. Now get the credentials for your AKS Cluster. It'll Merge ".kube/config" to my home directory.




    16. Now we can run a command to list Down all nodes in our AKS cluster.









    Other Kubernetes Articles:


    How to delete an AKS Cluster
    Upgrade an AKS Cluster in 4 steps

    No comments