Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AKS lab: no imagePullSecrets in mhc-aks.yaml #109

Closed
erjosito opened this issue Aug 21, 2018 · 4 comments
Closed

AKS lab: no imagePullSecrets in mhc-aks.yaml #109

erjosito opened this issue Aug 21, 2018 · 4 comments

Comments

@erjosito
Copy link

Hi there,

I am trying the AKS lab, but the frontend container image could not be downloaded. The pod mhc-front-xxxx would end up in ImagePullBackOff status.

In the pod events I found the error:
Failed to pull image "myacr.azurecr.io/myhealth.web:95": rpc error: code = Unknown desc = Error response from daemon: Get https://myacr.azurecr.io/v2/myhealth.web/manifests/95: unauthorized: authentication required

It looks like it is trying to pull the image without authenticating. I looked in the deployment description (kubectl get deploy/mhc-front -o yaml), and no imagePullSecrets are specified, although the secret (named mysecretkey per default) is correctly created.

Adding these lines to mhc-aks.yaml fixed it (although now I have a CrashLoopBackOff situation, but at least the image is successfully downloaded, so probably not related)

      imagePullSecrets:
      - name: mysecretkey

Let me know if you want a PR with the fix.

Cheers,
Jose

@sriramdasbalaji
Copy link
Collaborator

Hi Jose,

Could you please let us know how did you get the Service Principal details when you created Azure resources (https://almvm.azurewebsites.net/labs/vstsextend/kubernetes/#setting-up-the-environment )

Thanks
Balaji

@erjosito
Copy link
Author

Hey Balaji,

not sure I understand your question: I used the AKS template in the web site https://vstsdemogenerator.azurewebsites.net/. I dont remember creating SPs manually, I did not follow the guide you reference.

VSTS created a SP when configuring the connection to the subscription in the Build pipeline, and AKS created another one when I created the cluster (with the Azure CLI), not sure if you mean one of those two.

Cheers,
Jose

@sriramdasbalaji
Copy link
Collaborator

Hi Jose,

The Azure Service Principal which you have used for AKS cluster creation must also have access to Azure ACR. I suggest you follow the below HOL which will walk you through all the steps required to use the AKS template
https://almvm.azurewebsites.net/labs/vstsextend/kubernetes/
still if you face any issues please let us know.

Thanks
Balaji

@sriramdasbalaji
Copy link
Collaborator

Hi Jose,

I believe you were able to resolve the issue you encountered. We will be closing this issue. If you have any concerns please reopen the issue.

Thanks,
Balaji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants