Tools
Safety
- Read-only at the source. Connect with the read-only service account below. Its role has
get,listandwatchonly, so the API server itself refuses a write (permission_denied, with the verb and resource the cluster refused). - Writes are separate tools. Restart Rollout and Scale Deployment only run on a connection stored with mode
read_write; on aread_onlyconnection they are refused before anything is sent. Every call returns aconfirm_tokenfirst that the agent must show you and send back. They also need an identity allowed topatchdeployments. - Secrets are never read. No tool requests a Secret, Describe Resource refuses
kind: secretbefore any request, and the read-only role below has no access to Secrets at all. Environment variables that come from asecretKeyRefshow only the Secret and key names; a literalvaluewhose name looks like a credential (DB_PASSWORD,API_TOKEN) is masked. Test Connection warns when the identity could read Secrets. - TLS is always verified.
insecure-skip-tls-verifyis not supported: store the cluster’s CA certificate instead. A plainhttp://server is refused. - Limits on every call. A 15 s timeout (up to 55 s with
timeout_seconds), at most 500 items (up to 5,000 withmax_rows) and 1 MB per result; logs stop at 512 KB. A cut result hastruncated: true. - No secrets in results. Tokens, keys and the kubeconfig are removed from every error message, and pod logs are scrubbed of bearer tokens, AWS access keys, JWTs and
token=/api_key=values. - Every call is audited with who called, which tool, the duration and the outcome.
Create a read-only identity
Apply this once with an admin kubeconfig. It creates adanube namespace, a danube-readonly service account bound to a read-only ClusterRole, and a long-lived token for it.
danube-readonly.yaml
secrets. To limit Danube to some namespaces, bind the same ClusterRole with a RoleBinding in each namespace instead of the ClusterRoleBinding (List Namespaces and nodes then need their own small ClusterRole, or leave them out).
A short-lived token works too: kubectl -n danube create token danube-readonly --duration=24h. Store it again when it expires.
To let agents restart and scale deployments, create a second service account with this extra rule, and store it on a separate connection with mode read_write:
Connect
Open Kubernetes in the dashboard’s tool catalog and click Connect, or let the agent callstore_credential. Fill in one of:
- API server URL, Service account token and CA certificate (the three values printed above). This is the recommended form.
- Kubeconfig: a kubeconfig with inline credentials. Danube uses its
current-context, or the context named in Context. Runkubectl config view --raw --minify --flattento inline certificate files. Tokens and client certificates (client-certificate-data/client-key-data) work;execandauth-providerplugins (gke-gcloud-auth-plugin,kubelogin,aws eks get-token) cannot run inside Danube and are refused with a message saying so. - EKS: see below.
- Public API endpoint
- Private cluster, SSH bastion
- Private cluster, data-plane agent
EKS, GKE and AKS clusters with a public endpoint connect directly. Restrict the endpoint to Danube’s egress addresses: EKS
publicAccessCidrs, GKE authorized networks, AKS authorized IP ranges. See Connect your production database safely for the addresses.auth_required), RBAC (permission_denied), the network (connection_error, destination_blocked) or TLS (tls_error), and what the identity can do.
Amazon EKS
Either store a service account token as above (it works on every EKS cluster), or sign in with IAM: fill in EKS cluster name, AWS region, AWS access key ID, AWS secret access key and, for temporary credentials, AWS session token. Danube mints the same tokenaws eks get-token does for every call: a presigned STS GetCallerIdentity URL, valid 60 seconds. No IAM permission is needed to mint it.
Also store API server URL and CA certificate (aws eks describe-cluster --name prod --query 'cluster.[endpoint,certificateAuthority.data]'). If you leave them empty, Danube reads them with eks:DescribeCluster, which the IAM identity then needs.
Map the IAM identity to the read-only group in the cluster. First bind the ClusterRole above to a group:
aws-auth ConfigMap, add under mapRoles:
system:masters or associate AmazonEKSClusterAdminPolicy; Test Connection warns when it can write.
Google GKE
GKE kubeconfigs use thegke-gcloud-auth-plugin exec plugin, which cannot run inside Danube. Use the service account token instead: apply the YAML above, then store the cluster endpoint (gcloud container clusters describe prod --format='value(endpoint)', as https://<endpoint>), the token and the CA (--format='value(masterAuth.clusterCaCertificate)', base64 is accepted). For a private cluster, use the bastion or the data-plane agent.
Azure AKS
Clusters with Microsoft Entra ID integration usekubelogin, an exec plugin. Use the service account token instead, with the API server URL from az aks show -g rg -n prod --query fqdn and the CA from the token Secret. For a private cluster, use the bastion or the data-plane agent (for example on a VM in the cluster’s virtual network).
Example prompts
- “Why is
payments-workercrash looping?” - “Tail the logs of the checkout pods since 10 minutes ago.”
- “Which pods in
productionare not ready, and why?” - “Show me the warning events in the
paymentsnamespace from the last hour.” - “Is the
apirollout finished? If it is stuck, what is blocking it?” - “Restart the
checkoutdeployment and tell me when the new pods are ready.” (read_write connection)
