kubectl
as with any other Kubernetes cluster, with the caveat that you must use the kubeconfig
file that you download from Omni, and have the OIDC plug-in installed for your kubectl
.
All Kubernetes kubectl
commands are routed through the API endpoint created by Omni, and Omni validates access through the configured OIDC provider or other user authorization mechanism. This ensures your Kubernetes cluster is safe - unlike other systems, mere possession of a kubeconfig
grants no access - the user also has be valid in the configured authentication system of Omni.
oidc-login
plugin per the official documentation: https://github.com/int128/kubelogin#getting-started
kubectl
command to query a cluster, a browser window will open requiring you to authenticate with your identity provider.
If you get a message error: unknown command "oidc-login" for "kubectl" Unable to connect to the server
then you need to install the oidc-login plugin as noted above, and ensure it is in your $PATH.
omnictl
, talosctl
, and kubectl
will last for 8 hours. After 8 hours you will need to re-authenticate each tool for your environment.kubectl
command you run should trigger the OIDC login flow again, where you can authenticate as the user you need via Switch User
option.
kubectl
on a remote host over SSH you have two options.
kubeconfig
with --grant-type=authcode-keyboard
omnictl
to download the configuration with the following command:
KUBECONFIG
environment variable.
When using this configuration, the process will not attempt to open a browser automatically. Instead, it will present you with a URL and prompt you to enter a one-time code:
kubeconfig
and do port-forwardingoidc-login
attempts to use.
~/.ssh/config
file to contain the following lines for the host.
--skip-open-browser
in your $KUBECONFIG
file.