dhi.io/k8s-cc-manager
NVIDIA manager for enabling GPU Confidential Computing and Protected PCIe modes from Kubernetes node labels.
All examples in this guide use the public image. If you've mirrored the repository for your own use (for example, to your Docker Hub namespace), update your commands to reference the mirrored image instead of the public one.
For example:
dhi.io/k8s-cc-manager:<tag><your-namespace>/dhi-k8s-cc-manager:<tag>For the examples, you must first use docker login dhi.io to authenticate to the registry to pull the images.
This Docker Hardened k8s-cc-manager image includes:
k8s-cc-manager - the Python CC manager application (/app/main.py), which watches the node CC-mode label and drives
GPU CC/PPCIe mode changes.gpu-admin-tools - the vendored NVIDIA GPU administration library at /app/gpu-admin-tools, used to query and set
CC/PPCIe mode and to reset GPUs over PCI./app/.venv, with the Kubernetes Python client installed.busybox, which provides /bin/rm for the GPU Operator preStop hook.The entry point is the virtual-environment Python running the application: /app/.venv/bin/python /app/main.py.
k8s-cc-manager is designed to run as a Kubernetes DaemonSet on GPU nodes, normally deployed and managed by the NVIDIA
GPU Operator. Replace <version> with the DHI release you want to run and append -dev only when you need the
development variant.
Unlike most Docker Hardened Images, this image runs as root and must run privileged. The manager pokes GPU PCI
registers and resets GPUs through gpu-admin-tools, and it reads host confidential-computing state from /sys. A
typical pod spec therefore needs:
securityContext.privileged: true on the container./sys and /dev.get, list, watch, and patch nodes (and to list pods in the GPU Operator
namespace when component eviction is enabled).Because the image already runs as root, there is no -compat variant; use the runtime tag directly.
The manager is configured through environment variables. Set them in the DaemonSet pod spec:
| Variable | Required | Default | Description |
|---|---|---|---|
NODE_NAME | Yes | - | Node name, normally injected via fieldRef: spec.nodeName. |
DEFAULT_CC_MODE | No | on | CC mode applied when the nvidia.com/cc.mode label is unset. |
EVICT_OPERATOR_COMPONENTS | No | true | Evict GPU Operator components before changing CC mode. |
OPERATOR_NAMESPACE | No | gpu-operator | Namespace where the GPU Operator is deployed. |
CC_READINESS_FILE | No | /run/nvidia/validations/.cc-manager-ctr-ready | Readiness file created once the manager has applied the mode. |
KUBECONFIG | No | (in-cluster) | Path to a kubeconfig for out-of-cluster testing. |
These defaults come from the application itself, so the image does not hardcode them; set only what you need to override in the pod spec.
Set the CC mode on a node with a label:
# Supported values: on, off, devtools, ppcie
kubectl label node <node-name> nvidia.com/cc.mode=on --overwrite
The manager reports status back on the node:
kubectl get node <node-name> -o jsonpath='{.metadata.labels.nvidia\.com/cc\.mode\.state}'
Because this image starts a long-running watch that requires NODE_NAME and real GPU hardware, use --help to inspect
the command-line interface:
# Runtime variant (no shell) - print CLI help
docker run --rm dhi.io/k8s-cc-manager:<tag> --help
# Dev variant (includes a shell)
docker run --rm --entrypoint /app/.venv/bin/python dhi.io/k8s-cc-manager:<tag>-dev /app/main.py --help
For configuration details, refer to the upstream documentation.
When migrating from the upstream NVIDIA k8s-cc-manager image:
| Feature | Published upstream NVIDIA image | Docker Hardened k8s-cc-manager |
|---|---|---|
| Image reference | nvcr.io/nvidia/cloud-native/k8s-cc-manager:v0.4.0 | dhi.io/k8s-cc-manager:<version> |
| User | root (0:0) | root (0:0) - required, runs privileged |
| Shell | No | No (use -dev variant) |
| Package manager | No | No package manager in runtime variants |
| Tag format | v0.4.0 | <version> (no 'v' prefix) |
| Attack surface | Larger due to additional utilities | Minimal, only essential components |
| Debugging | Traditional shell debugging | Use Docker Debug or the -dev variant |
Docker Hardened Images come in different variants depending on their intended use. Image variants are identified by their tag.
Runtime variants are designed to run your application in production. For this image the runtime variant runs as root and privileged because it manages GPU hardware directly. These images:
Build-time variants include dev in the tag name and are intended for use in the first stage of a multi-stage
Dockerfile. These images:
To view the image variants and get more information about them, select the Tags tab for this repository, and then select a tag.
The hardened image intended for runtime does not contain a shell nor any tools for debugging. The recommended method for
debugging is to use Docker Debug to attach to the container, or
to run the -dev variant which includes a shell.
The manager requires NODE_NAME and exits with a non-zero code if it is not set. In a DaemonSet, inject it via a
fieldRef:
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
The manager must be able to reach GPU devices and host CC state. Ensure the container runs privileged and that host
/sys and /dev are mounted; otherwise mode queries and resets fail.
Docker Hardened Images may have different entry points than other images. Use docker inspect to inspect the entry
point and update your deployment if necessary. This image's entry point is /app/.venv/bin/python /app/main.py.