Retrieving login credentials for foundational services
About this task
Procedure
-
1. Login to the cluster by using the following oc login
command:
oc login <openshift_url> -u <username> -p <password> -n <cp4s_namespace>
For example:oc login https://api.sys-gi-svl03.cp.fyre.ibm.com:6443 -u kubeadmin -p orvnp-eAVwi-xTIoI-erIyn -n ibm-common-services
Expected output:
Login successful.
You have access to 67 projects, the list has been suppressed. You can list all projects with ' projects'.
Using project "ibm-common-services".
- Run the following command to retrieve the foundational services cluster
URL.
oc get routes cp-console -n ibm-common-services -o jsonpath='{.spec.host}' | awk '{print $1}'
For example:oc get routes cp-console -n ibm-common-services -o jsonpath='{.spec.host}' | awk '{print $1}'
Expected output:
cp-console.apps.sys-gi-svl03.cp.fyre.ibm.com
- Run the following command to retrieve the foundational services cluster admin
username.
oc get secret platform-auth-idp-credentials -o jsonpath='{.data.admin_username}' -n ibm-common-services | base64 -d | awk '{print $1}'
For example:oc get secret platform-auth-idp-credentials -o jsonpath='{.data.admin_username}' -n ibm-common-services | base64 -d | awk '{print $1}'
Expected output:
admin
- Run the following command to retrieve the foundational services cluster admin
password.
oc get secret platform-auth-idp-credentials -o jsonpath='{.data.admin_password}' -n ibm-common-services | base64 -d | awk '{print $1}'
For example:oc get secret platform-auth-idp-credentials -o jsonpath='{.data.admin_password}' -n ibm-common-services | base64 -d | awk '{print $1}'
Expected output:
xxxicspasswordxxx
- Login to the cluster by using cloudctl login
commands.
cloudctl login -a <cluster_url> -u <username> -p <password> -n <cp4s_namespace>
For example:cloudctl login -a https://cp-console.apps.sys-gi-svl03.cp.fyre.ibm.com -u admin -p xxxicspasswordxxx -n ibm-common-services
Expected output:
Authenticating...
OK
Targeted account mycluster Account
Targeted namespace ibm-common-services
Configuring kubectl ...
Property "clusters.mycluster" unset.
Property "users.mycluster-user" unset.
Cluster "mycluster" set.
User "mycluster-user" set.
Context "mycluster-context" created.
Switched to context "mycluster-context".
OK
Configuring helm: /home/<user>/.helm
OK