How to Configure Make Kubernetes Credentials

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up make kubernetes credentials by binding a scoped role to a cluster identity. Then you store that key inside your Make workflow tool to run API calls. Many teams start by pasting an admin key into their automation tool to save time. This shortcut gives external workflows full control over every namespace and node in the cluster. A single broken workflow or leaked key can wipe out production pods or expose secrets. How to set up make kubernetes credentials with RBAC Kubernetes uses Ro

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You set up make kubernetes credentials by binding a scoped role to a cluster identity. Then you store that key inside your Make workflow tool to run API calls. Many teams start by pasting an admin key into their automation tool to save time. This shortcut gives external workflows full control over every namespace and node in the cluster. A single broken workflow or leaked key can wipe out production pods or expose secrets.

How to set up make kubernetes credentials with RBAC

Kubernetes uses Role-Based Access Control to manage who can read or write cluster resources. In this system, all rules are additive, and there are no deny rules at all. You start with zero rights and add specific verbs like read, create, or delete. A Role sets permissions inside one single namespace for your automation tasks. A ClusterRole covers cluster-wide objects like nodes, or resources across every namespace at once.

To build safe make kubernetes credentials, you first create a dedicated identity for your workflows. Next, you write a Role that lists only the exact objects Make needs to touch. You then link that identity to the Role using a RoleBinding in one namespace. If the workflow must check resources across all namespaces, you use a ClusterRoleBinding instead. Finally, you load the token or certificate for that identity into your Make connection settings.

Watch out for subresources when you write these rules for your automation tool. The API server treats pod logs and pod exec calls as subresources written with a slash. If you grant access to pod exec, the workflow can run shell commands inside containers. Most Make scenarios only need to read pod status or update a deployment object. Leave exec and log subresources out of the Role unless the workflow truly needs them.

What native credentials solve and what they miss

Native RBAC does a great job of limiting which API paths a workflow can call. By scoping a RoleBinding to one namespace, you keep test workflows out of production apps. You also stop a bad automation step from deleting cluster nodes or editing other roles. This setup solves the basic problem of who can log in and touch which resource.

Still, static keys stored inside third-party workflow tools still leave a major operational gap open. Native RBAC checks the identity at login, not what individual commands do in flight. Once a key holds permission to read secrets or run exec, every request passes through. The cluster cannot require a human check before a risky step runs in production. It also cannot mask sensitive data like emails, phone numbers, card numbers, or national IDs. Also, rotating long-lived keys across dozens of Make workflows takes hours of manual work.

Ephemeral Credentials + Kubernetes RBAC: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Safer rules for automated cluster tasks

Teams can lower their risk by treating workflow keys like temporary guest passes. Never share a single cluster key across different Make teams or unrelated automation flows. Give each workflow its own Role and RoleBinding inside the exact namespace it supports. Check your bindings often to remove old keys that no active scenario uses anymore.

You should also track what your automated workflows do after they log in. API server audit logs record which identity called which resource and when it happened. Reviewing these logs helps you spot workflows that request more permissions than they actually use. When a workflow only reads pod state, strip out all write and delete verbs right away.

Check Kubernetes API requests and responses on the wire

Kubernetes RBAC decides who may call the API server. RBAC does not check response payloads or split listing Secret names from reading Secret values when a role grants get access. With hoop.dev, you run an open-source HTTP proxy, a sidecar for your Kubernetes API. The kubectl client changes only the server address it talks to while RBAC stays in place.

On each call, hoop.dev guardrails read the method, normalized path, and headers to refuse bad deletes or full Secret reads with a 403 error. On the way back, hoop.dev data masking walks JSON responses by key and masks matched values in Secrets, ConfigMaps, and pod logs. Every request and verdict is logged without storing bearer tokens. View the project on GitHub.

Frequently asked questions

Should I use a Role or a ClusterRole for Make workflows?

Use a Role with a RoleBinding whenever your Make workflow acts inside one single namespace. Only use a ClusterRoleBinding when the workflow must read or change objects across all namespaces.

Can I block a single resource using a Kubernetes deny rule?

No, Kubernetes RBAC rules are purely additive and do not support deny rules at all. You must start with an empty Role and grant only the exact resources Make needs.

Why is granting pod exec access to Make risky?

The pod exec subresource lets the caller run shell commands right inside a running container. If a workflow only manages deployments, leave pod exec out of its Role to reduce risk.

The query runs. The emails stay hidden.