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 config
- cloudctl login
- cloudctl logout
- cloudctl target
- cloudctl tokens
- cloudctl version
cloudctl api
cloudctl api - View the API endpoint and API version for the service.
Example
cloudctl api
cloudctl config
cloudctl config - Write default values to the config
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 login
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: Providing your password as a command line option is not recommended.
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 Namespace
--skip-ssl-validation Bypass SSL validation of HTTP requests. This option is not recommended.
cloudctl logout
cloudctl logout - Log user out.
Example
cloudctl logout
cloudctl target
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
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
cloudctl version - Check cli and api version compatibility
Example
cloudctl version