Creating a service ID by using IBM Cloud Private CLI
Prerequisites
Install the IBM Cloud Private CLI. See Installing the IBM Cloud Private CLI to get started.
Creating a service ID
-
Log in to IBM Cloud Private and set the namespace to generate tokens. The following command prompts you for a password and account:
cloudctl login -a https://<Cluster Master Host>:<Cluster Master API Port> u -n kube-system --skip-ssl-validationThe
<Cluster Master Host>and<Cluster Master API Port>parameters are defined in IBM Cloud Private endpoints. -
Use the following commands to list IAM commands and data:
-
cloudctl iam -
cloudctl iam roles -
cloudctl iam servicesTo learn more about the commands, options, and outputs, see the IBM Cloud Private CLI iam commands (iam) section of Managing your cluster with the IBM Cloud Private CLI (cloudctl)
-
-
Create the service ID for a service with the following command:
cloudctl iam service-id-create <service-id-name> -d <service-id-description>For example, to create a service ID for a metering service, run the following command, where
<service-id-name>ismeteringserviceIdand<service-id-description>isservice id for metering:cloudctl iam service-id-create "meteringserviceId" -d "service id for metering"See the example output:
Output ------ Creating service ID meteringserviceId bound to current account as admin... OK Service ID meteringserviceId is created successfully Name meteringserviceId Description service id for metering CRN crn:v1:icp:private:k8::n/kube-system::serviceid:ServiceId-58451b31-607b-42b4-99c8-1ceeea96bb48 Bound To crn:v1:icp:private:k8::n/kube-system:::You can manage service IDs, create and manage API keys, and create and manage policies for access to specific services that are needed by an application.