Skip to content
This repository has been archived by the owner on May 14, 2023. It is now read-only.

kim-sardine/kfadmin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kfadmin : CLI Tool for Kubeflow Admin

Prerequitite

  • kubectl
  • kubeconfig file (eg. ~/.kube/config)

commands like kubectl get nodes should be working.

Running environment

  • kubectl : v1.19.3
  • Kubernetes cluster : v1.19.3
  • kfctl : 1.2.0 (kfctl_istio_dex.v1.2.0.yaml)

Commands

NSY : Not Supported Yet

TBD : To Be Decided

Get

Get Dex Static Users

Only when you're using staticPasswords

kfadmin get staticusers

Get Profiles

kfadmin get profiles

Get Contributors (TBU)

  • kfadmin get contributors -p PROFILE
    • Get all contributors included in a specific profile

Create

Create Dex Static User

Only when you're using staticPasswords

kfadmin create staticuser -e USER_EMAIL -p PASSWORD -r

  • flags
    • -r, --restart-dex
      • Restart dex deployment after updating ConfigMap to reflect changes
      • Without this option, you have to run kubectl rollout restart deployment dex -n auth to manually reflect changes

Create profile

kfadmin create profile -p PROFILE_NAME -e OWNER_EMAIL

Create contributor using existing user and profile

kfadmin create contributor -p PROFILE_NAME -e USER_EMAIL

Update

Change Dex Static User's password

kfadmin update staticuser password -e USER_EMAIL -p NEW_PASSWORD -r

  • flags
    • -r, --restart-dex
      • Restart dex deployment after updating ConfigMap to reflect changes
      • Without this option, you have to run kubectl rollout restart deployment dex -n auth to manually reflect changes

Change profile owner

kfadmin update profile owner -p PROFILE_NAME -e NEW_OWNER_EMAIL

Delete

Delete Dex Static User

kfadmin delete staticuser -e USER_EMAIL -r

  • flags
    • -r, --restart-dex
      • Restart dex deployment after updating ConfigMap to reflect changes
      • Without this option, you have to run kubectl rollout restart deployment dex -n auth to manually reflect changes

Delete profile

kfadmin delete profile -p PROFILE_NAME

Remove contributor from profile

kfadmin delete contributor -p PROFILE_NAME -e USER_EMAIL

Auto Completion

bash

$ source <(kfadmin completion bash)

# To load completions for each session, execute once:
# Linux:
$ kfadmin completion bash > /etc/bash_completion.d/kfadmin
# macOS:
$ kfadmin completion bash > /usr/local/etc/bash_completion.d/kfadmin

zsh

# If shell completion is not already enabled in your environment,
# you will need to enable it.  You can execute the following once:
$ echo "autoload -U compinit; compinit" >> ~/.zshrc

# To load completions for each session, execute once:
$ kfadmin completion zsh > "${fpath[1]}/_kfadmin"

# You will need to start a new shell for this setup to take effect.

fish

$ kfadmin completion fish | source

# To load completions for each session, execute once:
$ kfadmin completion fish > ~/.config/fish/completions/kfadmin.fish

PowerShell

PS> kfadmin completion powershell | Out-String | Invoke-Expression

# To load completions for every new session, run:
PS> kfadmin completion powershell > kfadmin.ps1
# and source this file from your PowerShell profile.

About

Kubeflow Admin CLI Tool

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages