1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/rosa-accessing-your-cluster-quick.adoc
2025-10-29 14:03:36 +00:00

65 lines
1.7 KiB
Plaintext

// Module included in the following assemblies:
//
// * rosa_install_access_delete_clusters/rosa-sts-accessing-cluster.adoc
:_mod-docs-content-type: PROCEDURE
[id="rosa-accessing-your-cluster-quick_{context}"]
= Accessing your cluster quickly
You can use this quick access procedure to log in to your cluster.
[NOTE]
====
As a best practice, access your cluster with an IDP account instead.
====
.Procedure
. Enter the following command:
+
[source,terminal]
----
$ rosa create admin --cluster=<cluster_name>
----
+
.Example output
[source,terminal]
----
W: It is recommended to add an identity provider to login to this cluster. See 'rosa create idp --help' for more information.
I: Admin account has been added to cluster 'cluster_name'. It may take up to a minute for the account to become active.
I: To login, run the following command:
oc login https://api.cluster-name.t6k4.i1.organization.org:6443 \// <1>
--username cluster-admin \
--password FWGYL-2mkJI-3ZTTZ-rINns
----
<1> For a {hcp-title-first} cluster, the port number should be `443`.
. Enter the `oc login` command, username, and password from the output of the previous command:
+
.Example output
[source,terminal]
----
$ oc login https://api.cluster_name.t6k4.i1.organization.org:6443 \// <1>
> --username cluster-admin \
> --password FWGYL-2mkJI-3ZTTZ-rINns
Login successful.
You have access to 77 projects, the list has been suppressed. You can list all projects with 'projects'
----
<1> For a {hcp-title} cluster, the port number should be `443`.
. Using the default project, enter this `oc` command to verify that the cluster administrator access is created:
+
[source,terminal]
----
$ oc whoami
----
+
.Example output
[source,terminal]
----
cluster-admin
----