<commit_before>// Module included in the following assemblies:
//
// * registry/accessing-the-registry.adoc

[id="registry-accessing-directly_{context}"]
= Accessing registry directly from the cluster

You can access the registry from inside the cluster.

.Procedure

Access the registry from the cluster by using internal routes:

ifdef::openshift-enterprise,openshift-origin[]
. Access the node by getting the node's address:
+
----
$ oc get nodes
$ oc debug nodes/<node_address>
----
+
endif::[]

. Log in to the container image registry by using your access token:
+
ifdef::openshift-enterprise,openshift-origin[]
----
$ oc login -u kubeadmin -p <password_from_install_log>
$ podman login -u kubeadmin -p $(oc whoami -t) image-registry.openshift-image-registry.svc:5000
----
endif::[]
ifdef::openshift-dedicated[]
----
$ podman login -u $(oc whoami) -p $(oc whoami -t) $(oc -n openshift-image-registry get route default-route -o jsonpath='{.spec.host}')<commit_msg>Correct login command<commit_after>// Module included in the following assemblies:
//
// * registry/accessing-the-registry.adoc

[id="registry-accessing-directly_{context}"]
= Accessing registry directly from the cluster

You can access the registry from inside the cluster.

.Procedure

Access the registry from the cluster by using internal routes:

ifdef::openshift-enterprise,openshift-origin[]
. Access the node by getting the node's address:
+
----
$ oc get nodes
$ oc debug nodes/<node_address>
----

. In order to have access to tools such as `oc` and `podman` on the node, run the following command:
+
----
sh-4.2# chroot /host
----
+
endif::[]

. Log in to the container image registry by using your access token:
+
ifdef::openshift-enterprise,openshift-origin[]
----
sh-4.4# oc login -u kubeadmin -p <password_from_install_log> https://api-int.<cluster_name>.<base_domain>:6443 
sh-4.4# podman login -u kubeadmin -p $(oc whoami -t) image-registry.openshift-image-registry.svc:5000
----
endif::[]
ifdef::openshift-dedicated[]
----
$ podman login -u $(oc whoami) -p $(oc whoami -t) $(oc -n openshift-image-registry get route default-route -o jsonpath='{.spec.host}')
{'fraction_non_alphanumeric': 0.13852611940298507, 'fraction_numerical': 0.008395522388059701, 'mean_word_length': 4.095011876484561, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2752684', 'n_tokens_mistral': 700, 'n_tokens_neox': 666, 'n_words': 222}