MATIH Platform is in active MVP development. Documentation reflects current implementation status.
17. Kubernetes & Helm
Overview

Network Policies Overview

Network Policies in the MATIH platform implement a zero-trust network model where all pod-to-pod communication is denied by default and explicitly allowed only for known service dependencies. Policies are defined per service in Helm chart templates and enforce ingress, egress, and tenant isolation boundaries.


Network Policy Strategy

The MATIH platform follows a deny-all-then-allow approach:

  1. Default deny: A namespace-level policy denies all ingress and egress traffic
  2. Service-specific allow: Each service defines its own NetworkPolicy allowing only required communication paths
  3. Namespace isolation: Cross-namespace traffic is restricted to documented service dependencies
  4. Tenant isolation: Tenant namespaces cannot communicate with each other

Policy Architecture

Default Deny (namespace-level)
    |
    +--> Service-specific policies (per Helm chart)
    |        |
    |        +--> Ingress rules (who can talk to me)
    |        +--> Egress rules (who can I talk to)
    |
    +--> Namespace-level cross-namespace rules
    |
    +--> Tenant isolation policies

Namespace Communication Matrix

Source NamespaceTarget NamespaceAllowedMechanism
matih-systemmatih-data-planeYesCross-namespace policy
matih-data-planematih-systemLimitedOnly API Gateway to control plane
matih-monitoringAll namespacesYes (scrape only)Prometheus scrape policy
matih-ingressmatih-data-planeYesIngress controller policy
tenant-atenant-bNoTenant isolation
tenant-amatih-data-planeLimitedShared service access

Standard Policy Template

Each MATIH Helm chart includes a NetworkPolicy template that follows this pattern:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: service-name
spec:
  podSelector:
    matchLabels:
      app: service-name
  policyTypes:
    - Ingress
    - Egress
  ingress:
    # Allow from ingress controller
    # Allow from same namespace
    # Allow Prometheus scraping
  egress:
    # Allow DNS
    # Allow specific dependencies

Policy Enforcement

CNI PluginNetworkPolicy SupportUsed In
Azure CNIFullAKS (production)
CalicoFullOn-premises, multi-cloud
CiliumFull + enhancedAlternative for eBPF-based policies

Monitoring

NetworkPolicy effectiveness can be monitored through:

MetricSourceDescription
Dropped packetsCNI plugin metricsPackets blocked by policy
Connection failuresApplication logsConnection refused errors
Policy audit logsCNI audit modeAll policy evaluation decisions

Detailed Sections

SectionContent
Ingress PoliciesRules controlling inbound traffic to services
Egress PoliciesRules controlling outbound traffic from services
Tenant IsolationCross-tenant network boundary enforcement