Creating a Kubernetes Cluster
This section describes how to create a Kubernetes Cluster on Azure.
Note: The steps listed in this procedure for creating a Kubernetes cluster are for reference use. If you have an existing Kubernetes cluster or want to create a Kubernetes cluster based on your requirements, then you can directly navigate to step 9 to connect your Kubernetes cluster and the Linux instance. However, you must ensure that your ingress port is enabled on the Network Security group of your VPC.
To create a Kubernetes cluster:
Login to the Azure environment.
Click the Portal menu icon
The Portal menu appears.
Navigate to All Services > Containers > Kubernetes services.
The Kubernetes services screen appears.
Click Add.
The Create Kubernetes cluster screen appears.
In the Resource group field, select the required resource group.
In the Kubernetes cluster name field, specify a name for your Kubernetes cluster.
Retain the default values for the remaining settings.
Click Review + create to validate the configuration.
Click Create to create the Kubernetes cluster.
The Kubernetes cluster is created.
9. Login to the Linux instance, and run the following command to connect your Linux instance to the Kubernetes cluster.
`az aks get-credentials --resource-group <Name of Resource Group> --name <Name of Kubernetes Cluster>`
The Linux instance is now connected with the Kubernetes cluster. You can now run commands using the Kubernetes command line interface \(kubectl\) to control the nodes on the Kubernetes cluster.
Validate whether the cluster is up by running the following command.
kubectl get nodesThe command lists the Kubernetes nodes available in your cluster.
Run the
exportcommand to export the following environment variables.
export RG=<Resource Group Name>
export AKS=<AKS cluster Name>
export NS=<Namespace where protector is deployed>
export LOC=eastus (account default region)
export VAULT=<Azure Key Vault name>
export KEY=<Azure Key Name>
- Run the following commands to enable the OpenID Connect (OIDC) and workload identity on the AKS cluster.
az aks update -g $RG -n $AKS --enable-oidc-issuer --enable-workload-identity
export OIDC=$(az aks show -g $RG -n $AKS --query oidcIssuerProfile.issuerUrl -o tsv)
Feedback
Was this page helpful?