KOP Network Policy Manager - Namespace Network Policy Rule - Rafay Product Documentation

Namespace Network Policy rules

Overview

Namespace Network Policy Rules is a construct that defines a grouping of network security rules that can then be applied to a namespace policy.

RBAC

Only Org Admins, Project Admins and Workspace Admins can create/manage namespace network policy rules.

How To Write Namespace Network Policy Rules

For configuring namespace network policy rules, the CiliumNetworkPolicy CRD should be used.

Cilium supports configuring network policy rules based on labels, entities, IP/CIDR, DNS, Services, and more.

Example: Allow communication from endpoints with the label role=frontend to endpoints with the label role=backend.

apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
  name: "l3-rule"
spec:
  endpointSelector:
    matchLabels:
      role: backend
  ingress:
  - fromEndpoints:
    - matchLabels:
        role: frontend

Creating a Namespace Network Policy Rules

Rules can be created by either uploading a YAML file with the CRD definition or by pulling the YAML file from Git.

Rules can be added to a namespace policy by following the instructions in namespace policy

Updating a Namespace Network Policy Rules

Rules can be updated by either uploading a direct YAML file with the policy CRD definition and rules defined or by pulling the YAML file from Git.

Rules can be added to a namespace policy by following the instructions in namespace policy

Deleting a Namespace Network Policy Rules