Deploy YAML Application Manifest File for Container Application | AZ-303 Exam Answer

Azure Kubernetes Service (AKS) Cluster Management from Azure AD-Joined Device

Question

You have an Azure Kubernetes Service (AKS) cluster named Clus1 in a resource group named RG1.

An administrator plans to manage Clus1 from an Azure AD-joined device.

You need to ensure that the administrator can deploy the YAML application manifest file for a container application.

You install the Azure CLI on the device.

Which command should you run next?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C

kubectl apply "f appl.yaml applies a configuration change to a resource from a file or stdin.

Incorrect Answers:

A: kubectl get nodes gets a list of all nodes.

B: az aks install-cli download and install the Kubernetes command-line tool.

D: az aks get-credentials gets access credentials for a managed Kubernetes cluster

https://kubernetes.io/docs/reference/kubectl/overview/ https://docs.microsoft.com/en-us/cli/azure/aks

The correct answer is D. az aks get-credentials --resource-group RG1 --name Clus1.

Explanation:

In this scenario, we need to allow an administrator to manage an Azure Kubernetes Service (AKS) cluster named Clus1 from an Azure AD-joined device. The administrator needs to be able to deploy the YAML application manifest file for a container application.

To do this, we first need to install the Azure CLI on the device. The Azure CLI is a command-line interface for interacting with Azure resources, including AKS clusters.

Once the Azure CLI is installed, we need to authenticate the administrator to the AKS cluster. This is done by running the az aks get-credentials command with the appropriate parameters. The --resource-group parameter specifies the name of the resource group where the AKS cluster is located, and the --name parameter specifies the name of the AKS cluster.

For example, if the resource group name is "RG1" and the AKS cluster name is "Clus1", the command would be:

csharp
az aks get-credentials --resource-group RG1 --name Clus1

This command will retrieve the credentials needed to authenticate the administrator to the AKS cluster and configure kubectl to manage the cluster. Kubectl is a command-line tool used for deploying and managing applications on Kubernetes clusters.

Once authenticated, the administrator can then deploy the YAML application manifest file for the container application by running the kubectl apply command with the -f option, followed by the name of the YAML file.

For example, if the YAML file is named "appl.yaml", the command would be:

kubectl apply -f appl.yaml

This command will deploy the container application to the AKS cluster.