Cloud & infrastructure
Kubernetes
Connect a cluster by installing the Dave agent with Helm.
An in-cluster agent dials out to Dave, so no inbound access to your cluster is needed.
Connect
Section titled “Connect”-
Point your shell at the right cluster:
Terminal window kubectl config current-contextkubectl config use-context YOUR_CONTEXTYou need the rights listed below.
-
In Dave, go to Integrations → Add integration → Kubernetes.
-
Enter a Cluster name. This doubles as the label — see labels.
-
Choose Connect Cluster. Dave shows a Helm command under Run this to finish the setup.
-
Run it. It installs the release
dave-agentinto thedave-systemnamespace, creating the namespace if needed. Its registration token is valid for 15 minutes; if it lapses, choose Resume setup for a fresh command. -
Watch the agent come up:
Terminal window kubectl get pods -l app.kubernetes.io/name=dave-agent -AThe connection goes Active once the agent connects.
Each pending cluster gets its own command with its own registration token, so do not reuse one across clusters.
Permissions
Section titled “Permissions”The chart creates a service account dave-agent in dave-system, bound
cluster-wide to this ClusterRole, dave-agent-read-only:
rules: - nonResourceURLs: ['/api', '/api/*', '/apis', '/apis/*', '/healthz', '/readyz', '/version'] verbs: ['get'] - apiGroups: ['', 'apps', 'batch', 'networking.k8s.io', 'storage.k8s.io'] resources: - namespaces - nodes - pods - deployments - statefulsets - daemonsets - replicasets - services - endpoints - configmaps - persistentvolumes - persistentvolumeclaims - ingresses - jobs - cronjobs - storageclasses verbs: ['get', 'list', 'watch'] - apiGroups: [''] resources: - pods/log verbs: ['get'] - apiGroups: ['metrics.k8s.io'] resources: - pods - nodes verbs: ['get', 'list'] - apiGroups: ['argoproj.io', 'autoscaling.k8s.io'] resources: ['*'] verbs: ['get', 'list', 'watch']Dave cannot read Secrets, exec into pods, or change anything. The only extra grant
is a namespaced Role, dave-agent-credential, that lets the agent read and update
its own credential Secret:
rules: - apiGroups: [''] resources: ['secrets'] resourceNames: ['dave-agent-credential'] verbs: ['get', 'patch']Who can connect
Section titled “Who can connect”Whoever runs the Helm command needs to create a namespace, a ClusterRole and
ClusterRoleBinding, and a service account, Role, RoleBinding, Secrets and Deployment
in dave-system — in practice, cluster admin.
Manage the connection
Section titled “Manage the connection”To review what the agent can do:
kubectl get clusterrole dave-agent-read-only -o yamlkubectl get clusterrolebinding dave-agent-read-only -o yamlhelm list -n dave-systemDisconnect in Dave stops Dave receiving data from the agent immediately, but does not remove the agent from the cluster. Uninstall it yourself:
helm uninstall dave-agent -n dave-systemkubectl delete namespace dave-systemThe same goes for cancelling an unfinished setup — the install command stops working, but a release you already installed stays until you uninstall it. Reconnecting a cluster needs a fresh install.