CLI tool for ODH (Open Data Hub) and RHOAI (Red Hat OpenShift AI) for interacting with ODH/RHOAI deployments on Kubernetes.
Run the CLI using the pre-built container image:
Podman:
podman run --rm -ti \
-v $KUBECONFIG:/kubeconfig \
quay.io/lburgazzoli/odh-cli:latest lint --target-version 3.3.0Docker:
docker run --rm -ti \
-v $KUBECONFIG:/kubeconfig \
quay.io/lburgazzoli/odh-cli:latest lint --target-version 3.3.0The container has KUBECONFIG=/kubeconfig set by default, so you just need to mount your kubeconfig to that path.
SELinux: On systems with SELinux enabled (Fedora, RHEL, CentOS), add
:Zto the volume mount:# Podman podman run --rm -ti \ -v $KUBECONFIG:/kubeconfig:Z \ quay.io/lburgazzoli/odh-cli:latest lint --target-version 3.3.0 # Docker docker run --rm -ti \ -v $KUBECONFIG:/kubeconfig:Z \ quay.io/lburgazzoli/odh-cli:latest lint --target-version 3.3.0
Available Tags:
:latest- Latest stable release:dev- Latest development build from main branch (updated on every push):vX.Y.Z- Specific version (e.g.,:v1.2.3)
Note: The images are OCI-compliant and work with both Podman and Docker. Examples for both are provided below.
Interactive Debugging:
The container includes kubectl, oc, and debugging utilities for interactive troubleshooting:
Podman:
podman run -it --rm \
-v $KUBECONFIG:/kubeconfig \
--entrypoint /bin/bash \
quay.io/lburgazzoli/odh-cli:latestDocker:
docker run -it --rm \
-v $KUBECONFIG:/kubeconfig \
--entrypoint /bin/bash \
quay.io/lburgazzoli/odh-cli:latestOnce inside the container, use kubectl/oc/wget/curl:
kubectl get pods -n opendatahub
oc get dsci
kubectl-odh lint --target-version 3.3.0Available tools: kubectl (latest stable), oc (latest stable), wget, curl, tar, gzip, bash
Token Authentication:
For environments where you have a token and server URL instead of a kubeconfig file:
Podman:
podman run --rm -ti \
quay.io/lburgazzoli/odh-cli:latest \
lint \
--target-version 3.3.0 \
--token=sha256~xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--server=https://api.my-cluster.p3.openshiftapps.com:6443Docker:
docker run --rm -ti \
quay.io/lburgazzoli/odh-cli:latest \
lint \
--target-version 3.3.0 \
--token=sha256~xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--server=https://api.my-cluster.p3.openshiftapps.com:6443If you have Go installed, you can run the CLI directly from GitHub without cloning:
# Show help
go run github.com/lburgazzoli/odh-cli/cmd/main.go@latest --help
# Show version
go run github.com/lburgazzoli/odh-cli/cmd/main.go@latest version
# Run lint command
go run github.com/lburgazzoli/odh-cli/cmd/main.go@latest lint --target-version 3.3.0Note: Replace
@latestwith@v1.2.3to run a specific version, or@mainfor the latest development version.
Token Authentication:
go run github.com/lburgazzoli/odh-cli/cmd/main.go@latest \
lint \
--target-version 3.3.0 \
--token=sha256~xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--server=https://api.my-cluster.p3.openshiftapps.com:6443Available commands:
lint- Validate cluster configuration and assess upgrade readinessversion- Display CLI version information
Install the kubectl-odh binary to your PATH:
# Download from releases
# Place in PATH as kubectl-odh
# Use with kubectl
kubectl odh lint --target-version 3.3.0
kubectl odh versionFor detailed documentation, see:
make buildThe binary will be available at bin/kubectl-odh.
make publishThis builds a multi-platform container image (linux/amd64, linux/arm64).