API referenceConsole
Cloud provider
Polylane maps your cluster with a read-only agent, investigates crashloops, OOM kills and stuck rollouts from logs and events, and fixes code or manifests.

Connect

Connect Kubernetes from the terminal. Pass --help for the flags Kubernetes accepts, plus --no-browser for headless environments.

Terminal
polylane cloud connect --provider kubernetes

How it works

Access

The agent pod runs two containers: agent and cloudflared. Polylane reaches the cluster only through the tunnel, and the agent accepts only GET requests to the Kubernetes API. It refuses exec, attach, port-forward, proxy, watch and log streams.

The agent registers once and keeps its state in its own Secret. It identifies the cluster by the UID of the kube-system namespace, so a second install on the same cluster does not add a second connection. It registers again only after the tunnel stays down for about three minutes.

Infrastructure graph

Polylane lists the cluster every 15 minutes. It maps namespaces, nodes, persistent volumes, storage classes, cluster roles and their bindings. In each namespace, it maps deployments, replica sets, stateful sets, daemon sets, jobs, cron jobs, services, ingresses, config maps, service accounts, roles, role bindings, autoscalers, pod disruption budgets, network policies, persistent volume claims, and up to 500 pods. It never reads or syncs Secrets.

Edges show which node runs each pod, which service and ingress serve it, which controller owns it, and which autoscaler controls a workload. A URL in a workload environment variable becomes an edge to the matching resource, also in other clouds. When the same cluster also syncs through Google Cloud as a GKE cluster, the agent data replaces the GKE data.

Every three minutes, Polylane checks that the agent is online. While it is offline, the console shows the cluster as Offline and Polylane skips the sync.

Checks

Twice an hour, Polylane checks the cluster for:

  • Crash-looping pods: CrashLoopBackOff, or five restarts or more.
  • Containers that the kernel killed for memory (OOMKilled).
  • Pods stuck in the Pending phase.
  • Nodes that are NotReady or under memory, disk or PID pressure.

A failed check raises an issue, and Polylane starts an investigation for each issue that is severe enough. Polylane also reads node CPU and memory from metrics-server, and the desired, ready and unavailable replicas of deployments, stateful sets and daemon sets.

Investigations

During an investigation, agents get, list and describe objects, read events, read pod logs (also from the previous container), show CPU and memory per pod and node, follow rollout status, and run a diagnosis of a workload. Polylane cannot change the cluster through the agent: the chart grants no write access to Kubernetes objects.

Permissions

The chart creates a ClusterRole with only the get and list verbs. It covers pods and pod logs, nodes, namespaces, services, endpoints, events, config maps, service accounts, volumes and claims, workloads, jobs, ingresses, network policies, autoscalers, pod disruption budgets, RBAC objects, storage classes, metrics-server data and custom resource definitions. It does not include Secrets.

The only other grant is a Role in the polylane namespace. It lets the agent read and update its own state Secret, and nothing else. The agent uses a service account token that expires after one hour.

Troubleshooting

If the cluster does not appear, check the agent pod:

  • kubectl -n polylane get pods
  • kubectl -n polylane logs -l app.kubernetes.io/name=polylane-k8s -c agent
  • For tunnel problems: kubectl -n polylane logs -l app.kubernetes.io/name=polylane-k8s -c cloudflared

When the agent exits with code 3, Polylane refused the API key. Code 4 means that registration failed for a reason that a retry does not fix, such as the cloud-account limit of your plan.

Disconnecting

Do these steps in this order:

  1. Uninstall the release with helm uninstall polylane --namespace polylane. This removes the agent pods and the Secrets that the chart made. A Secret that you made for apiKey.existingSecret stays.
  2. Disconnect the cluster in Polylane. Polylane stops the sync and removes the tunnel.
  3. Revoke the agent's API key under Settings → API keys. Disconnecting does not revoke it.

If you disconnect in Polylane while the agent still runs, the agent registers again after a few minutes and the cluster comes back.

Disconnect

Disconnecting stops every sync and check and deletes the credentials Polylane held. Polylane removes what Kubernetes's API lets it remove. The following stays until you remove it yourself:

  • Helm release and agent pods in the cluster
Terminal
polylane cloud disconnect <id>

Tools

1

Operations agents can perform in threads.

kubectl
Read and operate on Kubernetes resources on a connected cluster (get/list/describe/logs/events/top/rollout, plus scale, restart, patch, delete, apply)

Supported resources

24

Resource types that show up in your infrastructure graph.

Namespace
Node
Deployment
Stateful Set
Daemon Set
Replica Set
Job
Cron Job
Pod
Service
Ingress
Config Map
Secret
Service Account
Role
Role Binding
Cluster Role
Cluster Role Binding
Persistent Volume
Persistent Volume Claim
Storage Class
Network Policy
Horizontal Pod Autoscaler
Pod Disruption Budget