grant-k8s-access

Trigger Jenkins jobs to grant temporary Kubernetes namespace access.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/nclandrei/dotfiles --skill grant-k8s-access
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: grant-k8s-access
Source: https://github.com/nclandrei/dotfiles/tree/main/config/skills/grant-k8s-access
Command: npx skills add https://github.com/nclandrei/dotfiles --skill grant-k8s-access

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Granting temporary Kubernetes namespace access when kubectl commands fail due to permission or access errors can be disruptive and slow in environments like sandbox, demo, or preprod.

Core Features & Use Cases

  • Triggers the Jenkins job SRE-Helpers / create-temporary-rolebinding to provision temporary access to the target namespace.
  • Validates essential environment variables (JENKINS_URL, JENKINS_USER, JENKINS_TOKEN, K8S_NAMESPACE) and provides guidance when any are missing.
  • Handles Jenkins behind Cloudflare Access with cookie management, queue polling, and status reporting to keep users informed.

Quick Start

Run the grant-k8s-access skill with the target environment to provision temporary access.

Frequently Asked Questions about grant-k8s-access

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I grant temporary Kubernetes namespace access via Jenkins?

Grant temporary Kubernetes namespace access by triggering the SRE-Helpers / create-temporary-rolebinding Jenkins job. This automates provisioning temporary rolebindings to resolve kubectl permission errors in sandbox, demo, or preprod environments.

What environment variables are required to automate Kubernetes namespace access?

Automating Kubernetes namespace access requires JENKINS_URL, JENKINS_USER, JENKINS_TOKEN, and K8S_NAMESPACE environment variables. The skill validates these parameters and provides setup guidance when any are missing.

Does this tool work with Jenkins behind Cloudflare Access?

Yes, Jenkins behind Cloudflare Access is fully supported. The skill handles Cloudflare-protected endpoints with cookie management, queue polling, and status reporting to maintain connectivity throughout the Jenkins build process.

Why do my kubectl commands fail with permission errors in sandbox or preprod environments?

kubectl commands fail due to missing temporary rolebindings. Triggering a parameterized Jenkins build provisions the required temporary Kubernetes namespace access to resolve permission or access errors.

How does Jenkins handle temporary access approval and queue polling?

Jenkins temporary access approval is managed through robust queue polling and JSON parsing. The skill provides clear failure or approval messaging for self-approval or external approval requirements during the Jenkins build lifecycle.

Can I use Jenkins to provision temporary access for specific Kubernetes environments?

Yes, Jenkins can provision temporary access scoped to specific Kubernetes environments like sandbox, demo, and preprod. It orchestrates parameterized Jenkins builds to target the designated K8S_NAMESPACE.