IBM Cloud Private general CLI commands (cloudctl)
Learn about the general cloudctl
commands that you can run to access your IBM® Cloud Private cluster.
- cloudctl api
- cloudctl completion
- cloudctl config
- cloudctl helm-init
- cloudctl login
- cloudctl logout
- cloudctl target
- cloudctl tokens
- cloudctl version
cloudctl api
View the API endpoint and API version for the service.
Example
cloudctl api
cloudctl completion
Generate an autocompletion script for the specified shell (bash or zsh).
Example
Generate an auto-completion script for the specified shell (bash or zsh).
This command can generate shell auto-completions. For example:
$ cloudctl completion bash
Source the output for completion.
$ cloudctl completion bash > cloudctl_complete.sh; source cloudctl_complete.sh
cloudctl config
Write default values to the configuration.
Example
cloudctl config [--http-timeout TIMEOUT_IN_SECONDS] [--trace true | false | path/to/file] [--color true | false] [--locale (LOCALE | CLEAR)] | --list
PARAMETERS:
--http-timeout value Timeout for HTTP requests (default: 60)
--trace value Trace HTTP requests
--color value Enable or disable color
--locale value Set default locale. If LOCALE is CLEAR, previous locale is deleted.
--list List all configurations
cloudctl helm-init
Prints the configuration of the HELM_HOST setting for Helm.
Example
cloudctl helm-init
EXAMPLE (Linux):
eval "$(cloudctl helm-init)"
EXAMPLE (Windows):
cloudctl helm-init > helm_host.cmd && call helm_host.cmd && del helm_host.cmd
cloudctl login
Log user in.
Example
cloudctl login [-a CLUSTER_URL] [-u USERNAME] [-p PASSWORD] [-c ACCOUNT_ID or ACCOUNT_NAME] [-n namespace] [--skip-ssl-validation]
WARNING: It is best practice to avoid providing your password in the command line option. Your password might be visible to others and might be recorded in your shell history.
EXAMPLE:
cloudctl login
To interactively provide your user name and password, omit the user name and password options.
cloudctl login -u name@example.com -p pa55woRD
Specify your username and password as arguments.
cloudctl login -u name@example.com -p "my password"
Use quotation marks (") around passwords that have spaces.
cloudctl login -u name@example.com -p "\"password"\"
If your password contains quotation mark characters (“), use backslash characters (\) to escape them.
PARAMETERS:
-a value The URL that you use to access the management console, such as https://<ip_address>:8443.
-u value Username
-p value Password
-c value Account ID or name
-n value Name of a namespace
--skip-ssl-validation Bypass SSL validation of HTTP requests. This option is not recommended.
cloudctl logout
Log user out.
Example
cloudctl logout
cloudctl target
Set or view the targeted namespace.
Example
cloudctl target [-n NAMESPACE]
PARAMETERS:
--namespace value, -n value Name of the namespace to target
cloudctl tokens
Display the OAuth tokens for the current session. Run cloudctl login
to retrieve the tokens.
Example
cloudctl tokens [ --access | --id ]
PARAMETERS:
--access, -a Only print the access token value
--id, -i Only print the ID token value
cloudctl version
Check CLI and API version compatibility.
Example
cloudctl version