Connect a Kubernetes cluster
Create a read-only service account in your cluster and give ProofLayer its address, certificate and token so it can check who has admin rights and how workloads are hardened.
Before you start
Kubernetes runs your company’s applications in containers. Connecting it needs a few commands run by someone who manages the cluster. This page is written so you can forward it to that person. A service account is a named identity for software inside the cluster; ProofLayer gets a token (a long text “pass”) for a read-only one.
- ProofLayer only reads: pods, namespaces and the list of who is bound to which role. It cannot change anything.
- The engineer needs
kubectlset up for the cluster and permission to create a service account and role bindings. - ProofLayer must be able to reach the cluster’s address over the internet. If your cluster is private, use the in-account agent option at the end instead.
- Choose a cluster name you will recognise (for example
prod-eks-mumbai). It appears on every piece of evidence.
Step 1: Add the connection in ProofLayer
Open Connections and click New connection
Choose Kubernetes, give it a name, and enter the Cluster name.
Open the new connection
Find the Kubernetes access card. You will fill it in at step 4.
Step 2: Create a read-only service account (engineer)
Create the service account
Run in a terminal kubectl create serviceaccount prooflayer -n kube-systemLet it view workloads
Bind it to the built-in read-only
viewrole.Run in a terminal kubectl create clusterrolebinding prooflayer-view --clusterrole=view --serviceaccount=kube-system:prooflayerLet it read the list of role bindings
The
viewrole does not include this, and ProofLayer needs it to check who has cluster-admin rights.Run in a terminal kubectl create clusterrole prooflayer-rbac-read --verb=get,list --resource=clusterrolebindings.rbac.authorization.k8s.io kubectl create clusterrolebinding prooflayer-rbac-read --clusterrole=prooflayer-rbac-read --serviceaccount=kube-system:prooflayer
Step 3: Collect the three values (engineer)
The API server URL
Run the command and copy the address after “Kubernetes control plane is running at”. It looks like
https://k8s.example.com:6443.Run in a terminal kubectl cluster-infoThe cluster certificate (CA)
This lets ProofLayer be sure it is talking to your cluster. Find
certificate-authority-datain your kubeconfig file, and decode it from base64 into text that starts with-----BEGIN CERTIFICATE-----. You can leave this blank if the cluster uses a certificate from a public authority.Run in a terminal (macOS or Linux) kubectl config view --raw --minify -o jsonpath='{.clusters[0].cluster.certificate-authority-data}' | base64 -dThe token
This creates a token that works for a year (
8760h). Diary its renewal.Run in a terminal kubectl create token prooflayer -n kube-system --duration=8760hThe token begins with
eyJ. Treat it like a password.
Step 4: Paste them into ProofLayer
On the Kubernetes access card, fill in the boxes
API server URL, Cluster CA certificate (PEM) (optional) and Service-account token. The token is stored encrypted and never shown again.
Click Save access
Check that it works
Click Test access
ProofLayer calls the cluster with the token.
Success shows Access verified. A problem shows Access test failed with the cluster’s reason.
Run a scan
Start one from Runs. Results appear under Findings.
- External ID
- pl-7f3a9c2e1b4d… (copy)
- Role ARN
- arn:aws:iam::123456789012:role/ProofLayerReadOnly
- Last access test
- Passed 12 Nov 2026, 08:55 UTC
What ProofLayer reads
- Admin rights: who is bound to the powerful
cluster-adminrole, so you can show the list is short. - Workload hardening: whether any container runs in privileged mode, whether images are pinned to a version instead of
:latest, and whether workloads run as a non-root user.
If something goes wrong
| What you see | Likely cause | What to do |
|---|---|---|
| Could not reach the server | The API server address is wrong or is not open to ProofLayer from the internet | Re-run kubectl cluster-info and compare. If the cluster is private, use the agent option. |
| Certificate error (unknown authority) | The CA certificate is missing or wrong | Paste the decoded certificate (starting -----BEGIN CERTIFICATE-----) into the CA box. |
| 401 Unauthorized | The token is wrong or has expired | Create a new token with kubectl create token and click Update access. |
| 403 Forbidden for role bindings | The role-binding read permission from step 2 was not added | Run the two commands in the third step of step 2, then test again. |