p5c (privesc), is a CLI tool to quickly manage permissions within a KKP installation.
This project uses the following Python packages:
Please use a recent Python version
The script allows you to:
- Promote a non-admin user to an admin
- Demote an admin user to a regular user
- Add an admin to a project
- Remove a user from a project
There are multiple ways of installing p5c:
git clone https://github.com/svalabs/p5c.git
cd p5c/
docker buildx build -t svalabs/p5c .
git clone https://github.com/svalabs/p5c.git
cd p5c/
podman buildx build --platform=linux/arm64 --network slirp4netns -t svalabs/p5c .
git clone https://github.com/svalabs/p5c.git
cd p5c/
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Just run the script, and it will guide you through the steps:
The containerized version expects the KUBECONFIG to be mounted to /app/config
.
docker run --rm -it -v ~/.kube/config:/app/config svalabs/p5c
The containerized version expects the KUBECONFIG to be mounted to /app/config
.
podman run --rm -it -v ~/.kube/config:/app/config svalabs/p5c
Please ensure that the environment variable $KUBECONFIG
is set!
source venv/bin/activate
python main.py