module
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Sep 7, 2023
License: Apache-2.0
Opens a new window with license information.
README
¶
kapilogin
Table of Contents
-
Purpose
-
Getting Started
- Configuration
- Contribute
- License
- Contact
Purpose
This project allows you to dynamicaly retrive kubeconfig files and use kubelogin for oidc login to authenticate on clusters managed by Cluster API.
(back to top)
Getting Started
Prerequisites
You need to have :
- Kubelogin installed on your machine.
- A Kubernetes cluster with Cluster API and child clusters bootstraped with it.
- Your cluster can assign IPs on Services type LoadBalancer.
- kubectl binary
Installation
- Deploy the latest kapilogin server release on the Kubernetes with Cluster API :
kubectl kustomize https://github.com/aamoyel/kapilogin/deploy | kubectl apply -f -
- Get the latest release of the CLI and add it in your PATH
(back to top)
Configuration
-
First, you need to get the LoadBalancer IP use by kapilogin API:
kubectl -n kapilogin get svc kapilogin -o json | jq '.status.loadBalancer.ingress[0].ip'
-
Create the Kapilogin configuration to authenticate with your clusters and define Kapilogin API endpoint :
cat <<EOF > $HOME/.kapilogin.yaml
kapiloginApiEndpoint: KAPILOGIN_API_ENDPOINT # LoadBalancer IP
oidcIssuerUrl: ISSUER_URL
oidcClientId: YOUR_CLIENT_ID
oidcClientSecret: YOUR_CLIENT_SECRET # Optional
EOF
-
To use this configuration you can pass "-c CFG_PATH" to the kapilogin CLI or set the var KAPILOGIN_CONFIG=~/.kapilogin.yaml
-
Now, you can use the 'kapilogin' CLI.
kapilogin --help
(back to top)
Contribute
You can create issues and PRs on this project if you have any problems or suggestions.
(back to top)
License
Distributed under the Apache-2.0 license. See LICENSE.txt
for more information.
(back to top)
Alan Amoyel - @AlanAmoyel
(back to top)
Directories
¶
cmd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.