A token generator for accessing Oracle Cloud Infrastructure (OCI) Kubernetes Engine (OKE) clusters in ~/.kube/config. This tool replaces the oci command to accelerate kubectl and k9s commands by generating tokens more efficiently.
oci-cluster-token is a lightweight utility designed to streamline access to Oracle Cloud's Kubernetes OKE clusters. Instead of relying on the oci command-line tool to fetch tokens, this tool generates them directly, improving the speed of Kubernetes CLI operations like kubectl and k9s.
- Generates tokens for OKE cluster access.
- Replaces the
ocicommand for faster~/.kube/configintegration. - Speeds up
kubectlandk9scommand execution.
- Clone the repository:
git clone https://github.com/mattn/oci-cluster-token.git
- Build the tool:
cd oci-cluster-token go build - Move the binary to your PATH:
mv oci-cluster-token /usr/local/bin/
- Configure your
~/.kube/configto useoci-cluster-tokeninstead of theocicommand for token generation. - Update the
execsection in your~/.kube/configto referenceoci-cluster-token:- command: oci-cluster-token apiVersion: client.authentication.k8s.io/v1beta1 args: - --cluster-id - <your-cluster-id>
- Run
kubectlork9sas usual, and the tool will handle token generation.
- Access to an Oracle Cloud Infrastructure account and an OKE cluster.
- Properly configured
~/.oci/configwith your OCI credentials.
go install github.com/mattn/oci-cluster-token@latest
MIT
Yasuhiro Matsumoto (a.k.a. mattn)