Blog | CloudStakes Technology
1712230954Guide to Integrate Existing Kubernetes Cluster into Azure Arc.webp

A Guide to Integrate Existing Kubernetes Cluster into Azure Arc

user-img

Nikita Gill

6th April 2022

Due to the increasing complexity of IT infrastructure, many organizations are struggling to control and govern their business-critical processes. The IT infrastructure complexity or innovation term refers to the extended version of data centers, hybrid cloud computing, and edge computing. And to manage and govern processes in such separate platforms, developers require different types of tools. That's where Azure Arc comes to play, which helps IT leaders to maintain the consistency of multi-cloud and on-premises platform process governance. Azure Arc manages the entire IT infrastructure in a single pane of glass through Azure Resource Manager, regardless of the platform and resource types. Azure Arc motivates developers to shift their traditional IT operations to the advanced and continuously processing DevOps platform. It also allows developers to deploy, manage, and govern applications in the containerized cloud platform, such as Kubernetes.

1. Be available in the Azure portal with two identifications, including ARM ID (Azure Resource Manager) and Managed sequence.

2. Be added to an Azure subscription and resource collection group.

3. Receive tags

While integrating Kubernetes with Azure Arc, the cluster administrator must deploy agents first, which are:

1. Azure-arc Kubernetes namespaces

2. Azure connectivity managers

3. Azure Arc logs collection analytical tools

4. Azure arc Configuration managers who monitor changes

This Arc enables Kubernetes to secure transitioning data through industry-level SSL certificates and encrypts the rest of the data in Azure Cosmos DB, which ensures the confidentiality of data remains intact. Furthermore, Kubernetes can work with any CNCF-certified cluster and support the following scenarios:

1. Connect Kubernetes clusters outside of the Azure infrastructure to perform grouping, tagging, and inventory processes.

2. Deploy and apply application configurations with the help of GitOps configuration management.

3. Monitor Kubernetes cluster using Azure Monitor

4. Apply threat protection measures using Azure Defender specialized build for Kubernetes containers.

5. Set custom target locations at the time of uploading database services and application processes on Azure Arc and event types onto the Kubernetes cluster.

Now, let's start with instructions to connect Kubernetes Cluster to Azure Arc:

1. Use Bash infrastructure to connect Kubernetes clusters with Azure Arc.

2. Azure CLI console is preferable to run process related commands.

A. In the case of local machine installations, to sign into the Azure console, use the command: “az login”, to check the console version use “az version”, and to update it use “az upgrade”.

3. If a system does not contain a running Kubernetes cluster, then it should be created using one of these mentioned platforms:

A. Docker (KIND)

B. Cluster API

C. In case developers want to connect the OpenShift cluster to Azure Arc, they must execute the cluster, using the following command at once: “az connectedk8s connect”

4. Kubernetes cluster creation command: oc adm policy add-scc-to-user privileged “system:serviceaccount:azure-arc:azure-arc-kube-aad-proxy-sa"

Points to be noted:

The selected or created Kubernetes cluster must have minimum OS nodes with system architecture type "Linux/amd64". Not all devices and IT infrastructures support this same configuration at an initial level; however, it can be set using the following steps: Implement a Kubernetes configuration file named “kubeconfig” that matches your Azure Arc enabled cluster’s context. Give its resources (Microsoft.Kubernetes/ connectedClusters) a ‘Read’ and ‘Write’ access. Install the latest version of the Helm CLI package into the cluster Keep upgrading Azure CLI with its latest releases (currently, the running version is 2.16.0) Implement the Azure CLI extension of connectedk8s with version number 1.0.0 using the command: “az extension add –name connectedk8s”.

Steps to integrate Azure Arc enabled Kubernetes Cluster:
    • Register providers’ information
    • Monitor the registration information (check whether the information is correctly registered or not, which usually takes 10 mins)
    • Create a resource group with a specific cluster deployment region (for example, EastUS)
    • Integrate the current Kubernetes cluster with the latest Azure Arz enabled Kubernetes Clusters
    • Check the connection between existing Kubernetes clusters and the latest Azure Arc enabled ones.
    • Connect this configuration with Arc and route Azure CLI & Azure Arc enabled Kubernetes Cluster with the help of Outbound Proxy Server and by adding environment variables.
    • Deploy and monitor Azure Arc enabled Kubernetes agents and operators using the “azure-arc" namespace.
    • Verify all deployed Azure Arz enabled Kubernetes cluster agents whether they are in an active state or not.
    • After meeting all specific agents’ purposes, always keep a habit of removing the provided cluster resources and agents from that Azure arc enabled Kubernetes cluster. But remember, removing clusters and related resources does not delete any active cluster agents automatically. Thus, “az connectedk8s delete” is the best practice to remove such resources rather than using the Azure portal.
Conclusion:

Azure Arc enables customers to control their Kubernetes clusters deployed on different locations with a single click system. Azure Arc enabled Kubernetes cluster unlocks all Azure cluster management directories, like Azure Policy, Monitor, and cluster resource utilization graphs. This Kubernetes cluster integration with Azure Arc helps project leaders to assign each team member their roles & responsibilities. They can do such with ease without sacrificing any work monitoring and authorizations. Need for managing your Kubernetes clusters using Azure Arc? Contact us today to get the best DevOps and cloud computing services in India.