The Cloud Consumption Interface includes a command line interface that administrators and developers can use to perform Supervisor Namespace tasks programatically.
To use the command line interface, you download a kubectl plug-in. The plug-in adds kubernetes Custom Resource Definitions (CRD) to the standard Kubernetes API server for CCI and provides CCI-specific commands that administrators and users can use to run CLI commands for configuration and troubleshooting.
Download the CCI kubectl plug-in
- Use your My VMware credentials to log in to the Cloud Services Console.
- Click to launch VMware Cloud Consumption Service.
- On the Cloud Consumption Interface Launchpad, click DOWNLOAD PLUGIN.
/Users/<username>/Downloads
, then add Downloads to your path or:
export PATH=/Users/<username>/Downloads:$PATH
Administrators can use the CCI kubectl to create cloud accounts, create and configure projects, regions, and Supervisor namespace classes. Users have some limited access to the CCI kubectl CLI commands.
Obtain an API Token
- Use your My VMware credentials to log in to https://console.cloud.vmware.com/csp/gateway/discovery.
- Click the drop-down arrow by your name.
- Click My Account.
- Click the API Tokens tab.
- Click GENERATE A NEW API TOKEN.
- Enter a Token Name.
- Under Define Scopes, select the Organization Roles and Service Roles. The Service Role selections depend on the level of access for the user.
Access level Organization Role Service Role admin Organization Member and
user Organization Member Note: To access Supervisor Namespaces as an SSO user, the API token for the Automation Service Broker User is assigned permissions for vCenter Supervisor Proxy by default. Do not remove the permission if the API token will be used to access Supervisor Namespaces using the proxy. - Click Generate.
- Select the OpenID check box.
- When the Token Generated window displays a token with the name that you specified, click COPY.
Log in and create context
Use your API token to log in to the CCI server and create Supervisor Namespace context.
kubectl cci login --server api.mgmt.cloud.vmware.com --token <YOUR_API_TOKEN>
To see CCI content, change the default context to CCI.
kubectl config use-context cci
--skip-set-context
argument. In this way, you will avoid logging into all supervisor namespaces.
kubectl cci set-context --project cci-explore --supervisor-namespace elastic-sky
To view additional information about a command, use kubectl cci [command] --help
.