microsoft / ApplicationInsights-Kubernetes

Enrich the telemetry data for .NET applications running inside containers that are managed by Kubernetes.
Other
135 stars 57 forks source link

No insight output as indicated in Zero Code light up Example #340

Closed eliassal closed 1 year ago

eliassal commented 1 year ago

I followed instructions at Zero Code light up Example, deployed the app to Local kubernetes (with docker desktop), I can access the url and right message is displayed as follows

image

Indicated at the end (after a while 2 minutes) that I should see output for Insights details which is not the case. I waited for more than 15 minutes and nothing happened.

So regarding the RBAC created, not sur I understand how it will get permissions in Azure? does deploy the sarole.yml would create the RBAC and grant permissions? to what knowing that the cluster is local not in Azure, it is a little bit confusing

Thanks for your help

xiaomi7732 commented 1 year ago

Hi @eliassal I see your other issue (#339), and putting it together with this one, I kind of know where the confusion is.

Now, I am not a K8s cluster expert, but here's my understanding: kubectl is contextual, which means it could work for both local and remote clusters (multiple clusters). Please refer to Connect to the cluster to see how to connect kubectl to your AKS cluster.

And to fully understand how kubectl works with multiple clusters, refer to this k8s official documentation: Configure Access Multiple Cluster.

The 2nd issue that I see, is that the zero code light-up example is not working. I'll take a look at what is going on there.

eliassal commented 1 year ago

I know very well kubectl and I did login to the ACR az acr login --name myregistry Then az aks get-credentials --resource-group y-RG --namemyAKSCluster then I was able to run kubectl get nodes and got

image

Then I executed the 3 statements

kubectl create -f k8s-namespace.yaml kubectl apply -f sa-role.yaml kubectl create -f k8s-Azure.yaml

but as you can notice in my initial post, it has the image pull error.

xiaomi7732 commented 1 year ago

Please see comments in #339. Let's address that first.

xiaomi7732 commented 1 year ago

The code in code light up works. There's no action to take for a code fix. I'll close this one for now. It seems like the issue is about missing permission to pull images from the registry.