kubernetes egress policy to allow UDP

11/7/2019

Trying to run application in kubernetes which need to access Sybase DB from with in the Pod . I have the below egress Network policy which should allow all .The sybase db connection is getting created but its getting closed soon(Connection Closed Error) . Sybase docs say

Firewall software may filter network packets according to network port. Also, it is common to disallow UDP packets from crossing the firewall.

My question is do i need to explicitly specify something for UDP or should nt the egress Allow all ( {}) take care of this ?

NetWork Policy

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: spring-app-network-policy
spec:
  podSelector:
    matchLabels:
      role: spring-app
  ingress:
    - {}
  egress:
    - {}
  policyTypes:
  - Ingress
  - Egress
-- Ajith Kannan
kubernetes
kubernetes-ingress
kubernetes-pod
sybase

1 Answer

11/19/2019

The issue was using spring cloud which internally deployed new pods with different names and the policy was not applied. It's working by adding network policy for the newly deployed applications.

-- KFC_
Source: StackOverflow