p0 kubeconfig
Overview
Request just-in-time access to an AWS EKS cluster and automatically configure your local kubectl context.
Basic Usage
p0 kubeconfig \
--cluster <CLUSTER_ID> \
--role <ROLE_KIND>/<ROLE_NAME> \
[--duration "<DURATION>"] \
[--resource <Kind> / <Namespace> / <Name>] \
[--reason "<REASON>"]Prerequisites
Logged-in user
k8s cluster deployed in GCP or AWS
k8s provider configured in integrations
Options & Flags
Flag
Required?
Description
--cluster <string>
Yes
The cluster ID as registered in P0 (not the ARN).
--role <string>
Yes
The Kubernetes RBAC role to request. Must be one of:
• ClusterRole/<roleName>
• CuratedRole/<roleName>
• Role/<namespace>/<roleName>
--resource <string>
No
Scope access to a specific resource or type. Must use spaces around slashes:
• <Kind> / <Namespace> / <Name>
• <Kind> / <Name>
--reason "<string>"
No
A free-form explanation for audit purposes (e.g. "Debugging DNS issues").
--duration "<string>"
No
How long you need access. Supported formats:
• 10 minutes
• 2 hours
• 5 days
• 1 week
--help
No
Show built-in help text for p0 kubeconfig.
Examples
1. Cluster-wide admin for 2 hours
Sample output:
2. Read pods in the staging namespace
Sample output:
3. Scoped view of a specific Deployment with reason
Sample output:
Refreshing Access
When credentials expire, simply re-run the same command (all flags are remembered):
Last updated