Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 821 Bytes

04-traffic-permission.md

File metadata and controls

46 lines (35 loc) · 821 Bytes

Default traffic permission

Default TrafficPermission policy allow all the connections, so it needs to be removed

kubectl delete trafficpermissions-kuma-io allow-all-default

Then apply the new policies:

apiVersion: kuma.io/v1alpha1
kind: TrafficPermission
mesh: default
metadata:
  name: demoapp-to-redis
spec:
  sources:
    - match:
        kuma.io/service: demo-app_kuma-demo_svc_5000
  destinations:
    - match:
        kuma.io/service: redis_kuma-demo_svc_6379
---
apiVersion: kuma.io/v1alpha1
kind: TrafficPermission
mesh: default
metadata:
  name: all-to-demoapp
spec:
  sources:
    - match:
        kuma.io/service: '*'
  destinations:
    - match:
        kuma.io/service: demo-app_kuma-demo_svc_5000

References