Skip to main content
The Kubernetes connector talks to the cluster’s API server over HTTPS. It works with Amazon EKS, Google GKE, Azure AKS, k3s, kind, OpenShift and any self-hosted cluster. There is no agent to install in the cluster: Danube signs in as an identity you create and can do exactly what that identity’s RBAC allows.

Tools

Safety

  • Read-only at the source. Connect with the read-only service account below. Its role has get, list and watch only, 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 a read_only connection they are refused before anything is sent. Every call returns a confirm_token first that the agent must show you and send back. They also need an identity allowed to patch deployments.
  • Secrets are never read. No tool requests a Secret, Describe Resource refuses kind: secret before any request, and the read-only role below has no access to Secrets at all. Environment variables that come from a secretKeyRef show only the Secret and key names; a literal value whose 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-verify is not supported: store the cluster’s CA certificate instead. A plain http:// 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 with max_rows) and 1 MB per result; logs stop at 512 KB. A cut result has truncated: 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 a danube namespace, a danube-readonly service account bound to a read-only ClusterRole, and a long-lived token for it.
danube-readonly.yaml
The ClusterRole deliberately leaves out 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 call store_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. Run kubectl config view --raw --minify --flatten to inline certificate files. Tokens and client certificates (client-certificate-data / client-key-data) work; exec and auth-provider plugins (gke-gcloud-auth-plugin, kubelogin, aws eks get-token) cannot run inside Danube and are refused with a message saying so.
  • EKS: see below.
Set Default namespace to the namespace agents should look at when a prompt names none. Mode stays Read only unless you want the two write tools to work.
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.
Run Test Connection after saving. It tells you which of these failed: the credential (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 token aws 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:
Then, with access entries (recommended):
Or, on a cluster that still uses the aws-auth ConfigMap, add under mapRoles:
Do not map the identity to system:masters or associate AmazonEKSClusterAdminPolicy; Test Connection warns when it can write.

Google GKE

GKE kubeconfigs use the gke-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 use kubelogin, 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-worker crash looping?”
  • “Tail the logs of the checkout pods since 10 minutes ago.”
  • “Which pods in production are not ready, and why?”
  • “Show me the warning events in the payments namespace from the last hour.”
  • “Is the api rollout finished? If it is stuck, what is blocking it?”
  • “Restart the checkout deployment and tell me when the new pods are ready.” (read_write connection)