Microsoft Azure Architect Technologies (legacy) — Question 21
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?
Answer options
- A. kubectl get nodes
- B. az aks install-cli
- C. kubectl apply ""f appl.yaml
- D. az aks get-credentials --resource-group RG1 --name Clus1
Correct answer: C
Explanation
The correct command is C, 'kubectl apply -f appl.yaml', because it is the command used to deploy a YAML manifest in Kubernetes. Option A, 'kubectl get nodes', merely retrieves information about the nodes and does not deploy anything. Option B, 'az aks install-cli', is used to install the Kubernetes CLI but is not necessary after the CLI is already installed. Option D, 'az aks get-credentials --resource-group RG1 --name Clus1', is used to set up the kubeconfig file but does not deploy the application.