IBM Cloud Pak® CLI (cloudctl) general commands (cloudctl)

Learn about the general cloudctl commands that you can run to access your cluster.

cloudctl api

View the API endpoint and API version for the service.

cloudctl api

OPTIONS:
   --ca  Output the cluster CA certificate in PEM format

cloudctl completion

Generate an auto-completion script for the specified shell (bash or zsh).

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.

cloudctl config [--http-timeout TIMEOUT_IN_SECONDS] [--trace true | false | path/to/file] [--color true | false] [--locale (LOCALE | CLEAR)] | --list

OPTIONS:
   --color value         Enable or disable color
   --http-timeout value  Timeout for HTTP requests (default: 60)
   --list                List all configurations
   --locale value        Set default locale; if LOCALE is CLEAR, previous locale is deleted
   --trace value         Trace HTTP requests

cloudctl helm-init

Prints the configuration of the HELM_HOST setting for Helm.

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.

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.


OPTIONS:
   -a value               The URL that you use to access the management console, such as https://<ip_address>:8443
   -c value               Account ID or name
   -n value               Name of a namespace
   -p value               Password
   --skip-helm-config     Bypass helm configuration
   --skip-kubectl-config  Bypass kubectl configuration if kubectl is not installed
   --skip-ssl-validation  Bypass SSL validation of HTTP requests; this option is not recommended
   -u value               Username

cloudctl logout

Log user out.

cloudctl logout

cloudctl target

Set or view the targeted namespace.

cloudctl target [-n NAMESPACE] [--list]

OPTIONS:
   --list                       List all available namespaces
   --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.

cloudctl tokens [ --access | --id ]

OPTIONS:
   --access, -a  Only print the access token value
   --id, -i      Only print the ID token value

cloudctl version

Check CLI and API version compatibility.

cloudctl version