Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam AZ-104 topic 4 question 42 discussion

Actual exam question from Microsoft's AZ-104
Question #: 42
Topic #: 4
[All AZ-104 Questions]

You create the following resources in an Azure subscription:
✑ An Azure Container Registry instance named Registry1
✑ An Azure Kubernetes Service (AKS) cluster named Cluster1
You create a container image named App1 on your administrative workstation.
You need to deploy App1 to Cluster1.
What should you do first?

  • A. Run the docker push command.
  • B. Create an App Service plan.
  • C. Run the az acr build command.
  • D. Run the az aks create command.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
You should sign in and push a container image to Container Registry.
Run the az acr build command to build and push the container image. az acr build \
--image contoso-website \
--registry $ACR_NAME \
--file Dockerfile .
Reference:
https://docs.microsoft.com/en-us/learn/modules/aks-deploy-container-app/5-exercise-deploy-app

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
VANSI
Highly Voted 3 years ago
I have this same question in the exam (passed) and does not have the option C. So I choose the Docker push.
upvoted 167 times
...
fedztedz
Highly Voted 3 years, 4 months ago
Answer is Correct . C. The question has a lot of missing steps. If we go with Answer A. then we need the following: - Make sure that ACR is integrated to AKS. - docker tag has been run with the right ACR. - docker push - create kubectl apply with the right deployment and right ACR. In case we go with Answer C. - No need for docker push or tag. - still need to make sure that ACR is integrated to AKS. - then run kubectl apply
upvoted 90 times
T0SHI
1 year, 1 month ago
C. Run the az acr build command. ACR tasks automatically push successfully built images to your registry by default, allowing you to deploy them from your registry immediately. Microsoft exam - Microsoft documentation ... If you are in doubt go to: https://learn.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-quick-task#deploy-to-azure-container-instances
upvoted 3 times
...
...
MandAsh
Most Recent 4 weeks, 1 day ago
Selected Answer: A
Image is already build on local machine you dont need to build it. So no need to az acr which builds the image. Rather we need to push already available image to registry. So option A push to docker would be appropratie.
upvoted 3 times
...
Amir1909
2 months ago
C is correct
upvoted 1 times
...
AAlmani
2 months ago
Selected Answer: C
it does not mentioned that App1 image get pushed to ACR, so we should run the az acr build command!
upvoted 1 times
...
GiorgioGss
2 months, 1 week ago
az acr build -t sample/hello-world:{{.Run.ID}} -r MyRegistry .
upvoted 1 times
...
jeru81
2 months, 2 weeks ago
Selected Answer: A
how weird is that? in explanation it is written in first sentence: You should sign in and push a container image to Container Registry... and answer is C? - What am I missing here?
upvoted 1 times
...
vsvaid
2 months, 3 weeks ago
Selected Answer: C
It is az acr command. It will create and push the image to container registry.
upvoted 1 times
...
FTCaR
4 months, 1 week ago
I hate how they made me create an account just to be like "Buy it now"
upvoted 3 times
...
93d821b
4 months, 2 weeks ago
azaks command builds the autoscaler You can also do this in azure portal. (https://learn.microsoft.com/en-us/azure/aks/cluster-autoscaler?tabs=azure-portal) Kubectl MANAGES already existing things https://learn.microsoft.com/en-us/answers/questions/1198828/kubectl-vs-azure-cli?cid=kerryherger https://learn.microsoft.com/en-us/answers/questions/1198828/kubectl-vs-azure-cli?cid=kerryherger
upvoted 1 times
...
SgtDumitru
4 months, 3 weeks ago
If in the options is `az acr`, choose it. If not- choose `docker push`.
upvoted 3 times
hebbo777
4 months, 3 weeks ago
You mean az acr first the docker push
upvoted 1 times
...
...
Vestibal
7 months ago
Selected Answer: A
https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-docker-cli?tabs=azure-cli
upvoted 2 times
...
rikininetysix
7 months ago
Selected Answer: C
To deploy the container image named App1 to your Azure Kubernetes Service (AKS) cluster named Cluster1, you should first run the az acr build command1. This command builds a container image in Azure Container Registry (ACR) from the source code located on your administrative workstation. It also uploads the image to ACR, making it available for deployment to your AKS cluster.
upvoted 1 times
Rednevi
6 months, 4 weeks ago
Building vs. Pushing: The az acr build command is used for the initial step of building a container image, which involves compiling source code, creating a Docker image from it, and then pushing it to an Azure Container Registry. In the scenario described, the container image (App1) is already built on your administrative workstation. Therefore, you do not need to build it again using az acr build.
upvoted 10 times
...
...
raj_raj22
7 months, 3 weeks ago
answer C is correct. as per Azure document it says "CR tasks automatically push successfully built images to your registry by default, allowing you to deploy them from your registry immediately."
upvoted 1 times
...
MGJG
8 months, 2 weeks ago
Selected Answer: A
To deploy the container image to the Azure Kubernetes Service (AKS) cluster, you need to perform the following steps: A. Run the docker push command: This option is the correct choice. Before deploying a container image to AKS, you need to push the image to a container registry (in this case, Registry1). The docker push command is used to upload the container image to the Azure Container Registry (ACR) so that it can be accessed by the AKS cluster. The correct sequence of steps would be: Build the container image for App1 on your administrative workstation. Tag the image with the ACR repository information (e.g., Registry1.azurecr.io/App1). Run docker push to upload the image to ACR. Configure AKS to use the image from the ACR repository. Create Kubernetes deployment and service definitions for App1 on AKS.
upvoted 4 times
...
RickySmith
8 months, 2 weeks ago
Selected Answer: C
This is indeed a tricky one. I reviewed C - https://learn.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-quick-task#deploy-to-azure-container-instances A - https://learn.microsoft.com/en-us/azure/container-registry/container-registry-quickstart-task-cli#build-and-push-image-from-a-dockerfile A references C, so Ci is correct, but in the absence of C, A is the next best one.
upvoted 1 times
josola
5 months, 1 week ago
But the image is already built, so you don't need "C" you just need to push your image.
upvoted 4 times
...
...
Teroristo
9 months ago
Answer is Run the az acr build command. az acr build will build and push the image at the same time. Queues a quick build, providing streaming logs for an Azure Container Registry. docker build/push will do the same thing, but you will have to configure docker to login to the container registry. If we go with Answer A, then we need the following: - Make sure that ACR is integrated to AKS. - docker tag has been run with the right ACR. - docker push - create kubectl apply with the right deployment and right ACR. In case we go with Answer C. - No need for docker push or tag. - still need to make sure that ACR is integrated to AKS. - then run kubectl apply Note: If answer C is missing from the exam, then select A. Reference: https://docs.microsoft.com/en-us/learn/modules/aks-deploy-container-app/5-exercise-deploy-app
upvoted 1 times
josola
5 months, 1 week ago
But the image is already built, so you don't need "C" you just need to push your image.
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...