1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/hcp-openstack-accessing.adoc
2025-06-13 14:17:09 +00:00

46 lines
1.6 KiB
Plaintext

// Module included in the following assemblies:
//
// * hosted_control_planes/hcp-manage/hcp-manage-openstack.adoc
:_mod-docs-content-type: PROCEDURE
[id="hcp-openstack-accessing_{context}"]
= Accessing the hosted cluster
You can access hosted clusters on {rh-openstack-first} by extracting the kubeconfig secret directly from resources by using the `oc` CLI.
The _hosted cluster (hosting)_ namespace contains hosted cluster resources and the access secrets. The _hosted control plane_ namespace is where the hosted control plane runs.
The secret name formats are as follows:
** `kubeconfig` secret: `<hosted_cluster_namespace>-<name>-admin-kubeconfig`. For example, `clusters-hypershift-demo-admin-kubeconfig`.
** `kubeadmin` password secret: `<hosted_cluster_namespace>-<name>-kubeadmin-password`. For example, `clusters-hypershift-demo-kubeadmin-password`.
The `kubeconfig` secret contains a Base64-encoded `kubeconfig` field. The `kubeadmin` password secret is also Base64-encoded; you can extract it and then use the password to log in to the API server or console of the hosted cluster.
.Prerequisites
* The `oc` CLI is installed.
.Procedure
. Extract the `admin-kubeconfig` secret by entering the following command:
+
[source,terminal]
----
$ oc extract -n <hosted_cluster_namespace> \
secret/<hosted_cluster_name>-admin-kubeconfig \
--to=./hostedcluster-secrets --confirm
----
+
.Example output
----
hostedcluster-secrets/kubeconfig
----
. View a list of nodes of the hosted cluster to verify your access by entering the following command:
+
[source,terminal]
----
$ oc --kubeconfig ./hostedcluster-secrets/kubeconfig get nodes
----