Kubernetes Watcher
The Kubernetes watcher discovers and monitors workloads running in Kubernetes clusters, reporting when newer image versions are available.
DeploymentStatefulSetDaemonSetCronJob
Prerequisites​
WUD must be able to reach the Kubernetes API server. Two modes are supported:
- In-cluster (default): WUD runs inside the cluster with an appropriate
ServiceAccount. - Out-of-cluster: provide a path to a
kubeconfigfile viaWUD_WATCHER_KUBERNETES_{name}_KUBECONFIG.
RBAC (In-Cluster Mode)​
When running WUD inside a Kubernetes cluster, configure the following RBAC resources so that WUD can read workloads, nodes, and pods:
apiVersion: v1
kind: ServiceAccount
metadata:
name: wud
namespace: wud
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: wud-reader
rules:
- apiGroups: ["apps"]
resources: ["deployments", "statefulsets", "daemonsets"]
verbs: ["get", "list"]
- apiGroups: ["batch"]
resources: ["cronjobs"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["nodes", "pods"]
verbs: ["get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: wud-reader-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: wud-reader
subjects:
- kind: ServiceAccount
name: wud
namespace: wud
Configuration Options​
CRON schedule for automatic checks
Random jitter in milliseconds applied to the CRON schedule
Path to a kubeconfig file. When omitted, in-cluster ServiceAccount is used.
Kubernetes namespace to watch. Empty means all namespaces.
Trigger a watch cycle immediately at startup
If true, all workloads are watched unless explicitly opted out
Default behavior for digest watching on non-semver images
Workload kinds to discover and monitor
Workload Customization & Annotations​
WUD supports annotations on Kubernetes workloads to fine-tune update discovery, filtering, and notifications.
Supported Prefixes​
- Canonical (Recommended):
getwud.app/<property> - Short alias:
wud/<property> - Legacy:
wud.getwud.io/<property>
Looking for detailed examples, regex filtering, tag transforms, or digest watching? Check out the comprehensive Container & Workload Customization guide.
Multi-Container Pods​
Suffix any annotation with .<container_name> to target a specific container within a multi-container pod:
annotations:
getwud.app/display.name.nginx: "My Nginx"
getwud.app/display.name.sidecar: "My Sidecar"
getwud.app/watch.digest.nginx: "true"
Examples​
- In-Cluster (default)
- Out-of-Cluster (kubeconfig)
- Deployment with annotations
WUD_WATCHER_KUBERNETES_MYCLUSTER_NAMESPACE=production
WUD_WATCHER_KUBERNETES_MYCLUSTER_WATCHBYDEFAULT=false
WUD_WATCHER_KUBERNETES_HOMELAB_KUBECONFIG=/home/wud/.kube/config
WUD_WATCHER_KUBERNETES_HOMELAB_NAMESPACE=default
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-nginx
namespace: production
annotations:
getwud.app/watch: "true"
getwud.app/tag.include: "^1\\.27\\..*"
getwud.app/display.name: "My Nginx"
getwud.app/display.icon: "mdi:nginx"
spec:
selector:
matchLabels:
app: my-nginx
template:
metadata:
labels:
app: my-nginx
spec:
containers:
- name: nginx
image: nginx:1.27.0
Container ID format​
WUD builds a unique ID for each watched container:
{namespace}_{kind}_{workloadName}_{containerName}
Example: production_deployment_my-nginx_nginx