IBM Cloud Private CLI cm commands (cm)

Learn about the cloudctl cm commands that you can run to manage your cluster.

cloudctl cm

cloudctl cm credentials-set-openstack

Set the infrastructure account credentials for the OpenStack cloud provider.

Example

cloudctl cm credentials-set-openstack -u <username> -p <password> --auth-url <auth-url> --domain-name <domain-name> --tenant-name <tenant-name> [ --ca-cert <ca-cert> ]

PARAMETERS:
   --auth-url value     The keystone URL.
   -u value             The username. (Name or id required)
   --user-id value      The user id. (Name or id required)
   -p value             The password.
   --ca-cert value      Path to a file containing the CA certificate.
   --domain-name value  The domain name. (Name or id required)
   --domain-id value    The domain id. (Name or id required)
   --tenant-name value  The tenant or project name. (Name or id required)
   --tenant-id value    The tenant or project id. (Name or id required)

cloudctl cm credentials-set-vmware

Set the infrastructure account credentials for the VMware cloud provider.

Example

cloudctl cm credentials-set-vmware -u <username> -p <password> --server-url <server-url> [--skip-ssl-validation]

PARAMETERS:
   -u value               The username for VMware.
   -p value               The password for VMware.
   --server-url value     The URL for VMware.
   --skip-ssl-validation  Skip SSL validation for VMware.

cloudctl cm credentials-unset

Remove cloud provider credentials. After you remove the credentials, you cannot access the cloud provider.

Example

cloudctl cm credentials-unset

cloudctl cm machine-type-add-openstack

Add an openstack machine type. A machine type determines the number of CPUs, the amount of memory, and disk space that is available to the node.

Example

cloudctl cm machine-type-add-openstack --name <name> --region <region> --flavor-name <flavor-name> --image-name <image-name> --security-groups <security-groups> --availability-zone <availability-zone> --network <network-name> --vm-user <vm-user> [--vm-password <vm-password> | --vm-key <vm-key>] [ --key-pair <key-pair> ]

PARAMETERS:
   --name value               The name of the machine type to be used as a reference
   --region value             The region.
   --flavor-name value        Flavor name for the instance.
   --flavor-id value          Flavor ID of the instance.
   --image-name value         Image name for the instance.
   --image-id value           Image ID for the instance.
   --availability-zone value  Availability zone for the instance.
   --security-groups value    List of security groups for the instance.
   --network value            Network to attach to the instance.
   --vm-user value            User to ssh into the machine for bootstrapping.
   --vm-password value        Password to ssh into the machine for bootstrapping.
   --vm-key value             Path to a file containing the private key to ssh into the machine for bootstrapping. The key must not be password protected.
   --key-pair value           Name of a key pair to set on the provisioned machine.

cloudctl cm machine-type-add-vmware

Add a VMware architecture. A VMware architecture determines the number of CPUs, the amount of memory, and disk space that is available to the node.

Example

cloudctl cm machine-type-add-vmware --name <name> --domain <domain> --datacenter <datacenter>  --datastore <datastore> --cluster <cluster>  --cpus <num-cpus> --memory <memory> --network <network> --template <template> --vm-user <vm-user> [--vm-password <vm-password> | --vm-key <vm-key>] [--dns-servers <dns-servers>]

PARAMETERS:
   --name value         The name of the machine type to be used during creating a cluster or adding a node
   --domain value       The domain for the instance.
   --datacenter value   The datacenter for the instance.
   --datastore value    The datastore for the instance.
   --cluster value      The cluster for the instance.
   --cpus value         Number of cpus for the instance.
   --memory value       Memory, in MB, for the instance.
   --dns-servers value  A comma separated list of DNS servers for the host.
   --network value      The network label for the instance.
   --template value     Template to create the node from.
   --vm-user value      User to ssh into the machine for bootstrapping.
   --vm-password value  Password to ssh into the machine for bootstrapping.
   --vm-key value       Path to a file containing the private key to ssh into the machine for bootstrapping. The key must not be password protected.

cloudctl cm machine-types

List available machine types. A machine type determines the number of CPUs, the amount of memory, and disk space that is available to the node.

Example

cloudctl cm machine-types

PARAMETERS:
   --json  Display output in JSON format.
   -s      Do not show the column headers in the output.

cloudctl cm master-get

View the details about a master node.

Example

cloudctl cm master-get <master-id>

PARAMETERS:
   --json  Display output in JSON format.

cloudctl cm masters

List all master nodes.

Example

cloudctl cm masters

PARAMETERS:
   --json  Display output in JSON format.
   -s      Do not show the column headers in the output.

cloudctl cm nodes

List all nodes.

Example

cloudctl cm nodes

PARAMETERS:
   --json  Display output in JSON format.
   -s      Do not show the column headers in the output.

cloudctl cm proxies

List all proxy nodes.

Example

cloudctl cm proxies

PARAMETERS:
   --json  Display output in JSON format.
   -s      Do not show the column headers in the output.

cloudctl cm proxy-add

Add a proxy node to a cluster.

Example

cloudctl cm proxy-add --machine-type <machine-type-name> --network <network> [--ip <ip>] [--gateway <gateway>]

PARAMETERS:
   --machine-type value  The machine type of the node. To see available machine types, run cloudctl cm machine-types <location>
   --network value       The name of the network or IP pool.
   --ip value            The IP the proxy node will be accessible from.
   --gateway value       Gateway for the access IP. VMware only.
   --file value          The path to a YAML file that includes values for the command. Override these values by including parameters directly to the command

cloudctl cm proxy-get

View the details about a proxy node.

Example

cloudctl cm proxy-get <proxy-id>

PARAMETERS:
   --json  Display output in JSON format.

cloudctl cm proxy-rm

Remove proxy nodes.

Example

cloudctl cm proxy-rm [-f] <proxy-id> [proxy-id2..]

PARAMETERS:
   -f  Force the removal of a proxy node with no user prompts

cloudctl cm psp-default-get

Display the default Kubernetes pod security policy that is applied to the cluster.

Example

cloudctl cm psp-default-get

cloudctl cm psp-default-set

Toggles the setting of the default Kubernetes pod security policy between restricted or unrestricted. If set to restricted, the ibm-restricted-psp is applied by default to all existing and created namespaces. If set to unrestricted, the ibm-anyuid-hostpath-clusterrole is applied by default to all existing and created namespaces.

Example

cloudctl cm psp-default-set restricted|unrestricted

cloudctl cm registry-init

Initialize cluster image registry.

Example

cloudctl cm registry-init -u USERNAME [-p PASSWORD] --server SERVER

      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 registry-init -u name@example.com --server mycluster.icp:8500
          To interactively provide your password, omit the password option.
      cloudctl registry-init -u name@example.com -p pa55woRD --server mycluster.icp:8500
          Specify your username and password as arguments.
      cloudctl registry-init -u name@example.com -p "my password" --server mycluster.icp:8500
          Use quotation marks (") around passwords that have spaces.
      cloudctl registry-init -u name@example.com -p "\"password"\" --server mycluster.icp:8500
          If your password contains quotation mark characters (“), use backslash characters (\) to escape them.


PARAMETERS:
   -u value        The username needed to login to the cluster image registry
   -p value        The password needed to login to the cluster image registry
   --server value  The cluster image registry server

cloudctl cm worker-add

Add a worker node to a cluster.

Example

cloudctl cm worker-add --machine-type <machine-type-name> [--num <num>]

PARAMETERS:
   --machine-type value  The machine type of the node. To see available machine types, run cloudctl cm machine-types <location>
   --num value           The number of nodes to add. Defaults to 1
   --file value          The path to a YAML file that includes values for the command. Override these values by including parameters directly to the command

cloudctl cm worker-get

View the details about a worker node.

Example

cloudctl cm worker-get <worker-id>

PARAMETERS:
   --json  Display output in JSON format.

cloudctl cm worker-rm

Remove worker nodes.

Example

cloudctl cm worker-rm [-f] <worker-id> [worker-id2..]

PARAMETERS:
   -f  Force the removal of a worker node with no user prompts

cloudctl cm workers

List all worker nodes in an existing cluster.

Example

cloudctl cm workers

PARAMETERS:
   --json  Display output in JSON format.
   -s      Do not show the column headers in the output.