getting 502 error after applying network policy in the AKS - AGIC setup

Somiya 246 Reputation points
2022-04-06T04:58:10.617+00:00

Hi, I have deployed two apps in the different namespaces and I don't want the pods deployed in one namespace to interact with the pods on the other namespace . I have applied the network policy, but after the application the backend shows as unhealthy on the app gateway and I am getting the 502 error.

190432-image.png

Here is the netowrk policy file:

> kind: NetworkPolicy   
> apiVersion: networking.k8s.io/v1   
> metadata:   
>   app: app1   
>   namespace: development   
> spec:   
>   podSelector:   
>     matchLabels:   
>   ingress: []   

Do I have allow traffic from specific namespace/pod??

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,217 questions
Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,456 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. risolis 8,741 Reputation points
    2022-04-06T05:55:10.74+00:00

    Hello @Somiya

    Thanks for bringing our attention by posting this question.

    Are your Nodes running Linux?

    Cheers


  2. risolis 8,741 Reputation points
    2022-04-06T06:44:39.287+00:00

    190404-image.png


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.