google cloud platform – kubectl fails to fetch Argocd resource of type Application when kubectl inside a container
We have a gke cluster and we have installed ArgoCD on it. When we run the command locally to get applications:
kubectl get applications -n argocd the list of Application resources can be seen.
Then, when we try to run gke-deploy apply on our ArgoCD config, the apply fails saying that fetching a certain application failed. But when we run the apply locally using kubectl, which gke-deploy is using under the hood, it successfully applies the argo config.
We have checked the permissions for both the environments by running kubectl auth can-i get applications -n argocd and both returns Yes.
It might be worth mentioning that we were using gke-deploy in our cloudbuild argocd build and we started facing this issue almost out of nowhere.
We thought that this might be because of the latest image version (since we had not specified the version tag for our gke-deploy image. But trying tags like master, stable and a hashed version did not help as well.
Since we are not sure which tool could be responsible for this issue, hence posting here.
Read more here: Source link
