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

   --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 >; source

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

   --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.

      cloudctl login
          To interactively provide your user name and password, omit the user name and password options.
      cloudctl login -u -p pa55woRD
          Specify your username and password as arguments.
      cloudctl login -u -p "my password"
          Use quotation marks (") around passwords that have spaces.
      cloudctl login -u -p "\"password"\"
        If your password contains quotation mark characters (“), use backslash characters (\) to escape them.

   -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]

   --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 ]

   --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