KubeOps CLI Commands
3 minute read
KubeOps KubeOpsCtl CLI Commands
This documentation shows all commands of the kubeopsctl and how to use them.
General commands
Overview of all KUBEOPSCTL commands
Description:
kubeopsctl is a kubernetes cluster manager
Usage:
kubeopsctl [command] [options]
Options:
--version Show version information
-?, -h, --help Show help and usage information
Commands:
version kubeopsctl version information
login Login to kubeops hub and registry
logout Logout from kubeops hub
pull Pull kosi packages for kubernetes cluster setup and plattform tools
apply Apply values on kubernetes cluster
Command ‘kubeopsctl –version’
The kubeopsctl --version command shows you the current version of kubeopsctl.
kubeopsctl --version
The output should be:
2.0.3
Command ‘kubeopsctl –help’
The command kubeopsctl --help gives you an overview of all available commands:
kubeopsctl --help
Alternatively, you can also enter kubeopsctl or kubeopsctl -? in the command line.
Command ‘kubeopsctl login’
The command kubeopsctl login performs a login against the KOSI HUB. A valid login session is neccessary to pull the packages.
Description:
Login to kubeops hub and registry
Usage:
kubeopsctl login [options]
Options:
-u, --username <username> (REQUIRED) Username
-p, --password <password> Password
-?, -h, --help Show help and usage information
Example:
kubeopsctl login -u <username> -p <password>
Command ‘kubeopsctl logout’
The command kubeopsctl logout performs a logout from the KOSI HUB.
Description:
Logout from kubeops hub
Usage:
kubeopsctl logout [options]
Options:
-?, -h, --help Show help and usage information
Example:
kubeopsctl logout
Command ‘kubeopsctl pull’
The command kubeopsctl pull downloads all necessary KOSI packages to the admin node:
Description:
Pull kosi packages for kubernetes cluster setup and plattform tools
Usage:
kubeopsctl pull [options]
Options:
-k, --kubernetesVersion <kubernetesVersion> Kubernetes version
-f, --tools <tools> Tools values file
-?, -h, --help Show help and usage information
Example:
kubeopsctl pull
If you do not specify a parameter, the latest from kubeopsctl supported Kubernetes version will be pulled.
With parameter --kubernetesVersion 1.30.8 you can pull an older Kubernetes version.
Example:
kubeopsctl pull --kubernetesVersion 1.30.8
https://dispatcher.kubeops.net/v4/dispatcher/
Command ‘kubeopsctl apply’
The command kubeopsctl apply is used to set up the kubeops platform with a configuration file.
Description:
Apply values on kubernetes cluster
Usage:
kubeopsctl apply [options]
Options:
-f, --file <file> (REQUIRED) Values files for cluster, tools and user
-?, -h, --help Show help and usage information
-f flag
The -f parameter is used to use value parameter yaml-files
Example:
kubeopsctl apply -f cluster-values.yaml
To install your KubeOps Compliance Applications, you have to use a second value file. It is called enterprise-value.yaml
Example:
kubeopsctl apply -f cluster-values.yaml -f enterprise-values.yaml
–delete flag
The -- delete parameter is used to perform a delete action.
This flag delete all nodes which are not present in the cluster-values.yaml - file
Example:
kubeopsctl apply --delete -f cluster-values.yaml