Skip to content

Namespace (kubeflow / kubeflow-system)

Interactive Diagram

새 탭 ↗
ItemValue
VersionNot applicable (namespace manifests from community-distribution release-26.03.1)
Official docsKubernetes Namespaces, Pod Security Standards
Upstream sourcecommon/kubeflow-namespace/base

Almost every Kubeflow component runs in the shared kubeflow namespace (and in kubeflow-system, which is in transition). Without this namespace no later component has a place to be deployed, so this is the lowest foundation of the platform. This step does more than create names. It uses labels and policies to predefine the security and networking defaults for every workload that will run on top of it.

  • Location of the control plane: platform management components such as Dashboard, Profiles controller, Notebooks controller, Katib, KServe controller, and Pipelines are gathered in the kubeflow namespace.
  • Automatic mesh enrollment: with the istio-injection: enabled label, an Istio sidecar is auto-injected when a Pod is created in this namespace, so the Pod becomes subject to mTLS and authorization policy.
  • Pod security baseline: pod-security.kubernetes.io/enforce: restricted enforces the strictest Pod Security Standard on Pods in this namespace.
  • Baseline network isolation: NetworkPolicy allows only same-namespace communication by default, and opens exceptions only for Kubernetes API server webhook access and required traffic from istio-system.

If these namespaces do not exist, nothing else has a place to run. If their labels and policies are wrong, every later component inherits the wrong security and networking defaults. Because the labels are set at the namespace level, later components do not have to repeat the same defaults in every workload manifest.

The overlay overlays/dev/kubeflow-namespace references common/kubeflow-namespace/base as is. There are no separate patches. It is the foundation applied first in the deployment order and has no prerequisites. That is a good signal that this layer is meant to stay simple and foundational.

NamespaceResourceNameRole
(cluster)NamespacekubeflowLocation of control-plane components. Labels istio-injection: enabled, pod-security: restricted, control-plane: kubeflow
(cluster)Namespacekubeflow-systemLocation being transitioned to for new components (Trainer / JobSet). Same labels
kubeflowNetworkPolicydefault-allow-same-namespace and many othersAllow same-namespace communication + exceptions for API server webhook (:8443) and istio-system

PlantUML source:

PlantUML Diagram
  • Prerequisites: none. This step is the starting point of the deployment order.
  • Downstream (deployed into this namespace): effectively every component. Dashboard, Profiles, Notebooks, Katib, KServe controller, Pipelines, and others are deployed into kubeflow, and Trainer is deployed into kubeflow-system.
  • Runtime interactions: because of the istio-injection label, Pods in this namespace get a sidecar injected at creation and join the mesh. PodSecurity restricted constrains the Pod spec (privileges, volumes, and so on), and NetworkPolicy controls inbound traffic.

Later installation failures often trace back to this layer. For example, a control-plane Pod that requests disallowed privileges or expects broader network access may fail because the namespace defaults are doing exactly what they were designed to do.

  • Three namespace labels: istio-injection: enabled (mesh enrollment), pod-security.kubernetes.io/enforce: restricted (PSS enforcement), control-plane: kubeflow (control-plane identification).
  • NetworkPolicy set: by default only same-namespace communication is allowed, and for each component’s mutating webhook (cache-server, jupyter-web-app, katib-controller, kserve, training-operator, and others) only access from the API server and istio-system is opened, forming a least-privilege network.
  • Later steps can place Pods only after this namespace is established, so it must come first in the deployment order.

The NetworkPolicy set is not a blanket allow. The Kubernetes API server must be able to reach the admission webhooks, and Istio control-plane traffic must still function, but unrelated inbound traffic should not be open by default. This gives the deployment a safer starting point than leaving the namespaces unrestricted and attempting to tighten them later.

The following are read-only examples to run in a context with the required permissions. They were not run against a cluster while revising this article.

Terminal window
# namespace label 3종이 적용됐는지 확인
kubectl get namespace kubeflow kubeflow-system --show-labels
# 기본 NetworkPolicy 목록과 허용 대상 확인
kubectl get networkpolicy -n kubeflow
kubectl describe networkpolicy -n kubeflow default-allow-same-namespace
# 기존 Pod의 restricted 위반 여부를 server-side dry-run으로 확인
# enforce 값이 이미 restricted라면 같은 값을 다시 지정해도 PSA가 기존 Pod 검사를 생략한다.
# enforce-version을 현재와 다른 값(예: 미지정=latest → 클러스터 minor version)으로 바꿔야 실제 검사가 실행된다.
# 리소스는 저장되지 않지만 namespace update 권한이 필요하다.
kubectl label --dry-run=server --overwrite namespace kubeflow \
pod-security.kubernetes.io/enforce=restricted \
pod-security.kubernetes.io/enforce-version=v1.30
# sidecar 주입 여부 확인: 각 Pod의 container 목록에 istio-proxy가 있어야 한다
kubectl get pod -n kubeflow \
-o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.containers[*].name}{"\n"}{end}'
  • The Deployment exists but has zero Pods: admission rejects Pod specs that violate restricted. The rejection appears on the ReplicaSet, not the Deployment, as a FailedCreate event saying violates PodSecurity "restricted:latest", so check it with kubectl describe replicaset -n kubeflow <name>. Missing runAsNonRoot, allowPrivilegeEscalation: false, capabilities.drop: [ALL], or seccompProfile are the usual causes.
  • Creating other resources hits webhook timeouts: if NetworkPolicy blocks API server traffic to a webhook Pod in this namespace, requests fail with failed calling webhook ... context deadline exceeded. Check that the webhook service port matches the exception rule (such as :8443).
  • No sidecar, or mTLS policy is not applied: the namespace label does not inject sidecars into Pods that were already running. Confirm the label, then restart the workload.

This component is easy to overlook because it is small, but it is one of the most consequential parts of the installation. It creates the execution boundary in which the Kubeflow control plane lives and fixes the default behavior for service-mesh enrollment, Pod security, and basic network isolation before any higher-level service appears.