Skip to content

Commit b3a3c8d

Browse files
authored
Merge pull request #84112 from mburke5678/mco-fix-yq-command-error
OCPBUGS43810: Add prereq to install python-yq
2 parents 9a78a41 + c8a1bbb commit b3a3c8d

File tree

1 file changed

+59
-33
lines changed

1 file changed

+59
-33
lines changed

modules/checking-mco-status-certs.adoc

Lines changed: 59 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ The MCC also handles the image registry certificates and its associated user bun
1616

1717
You can get information about the listed certificates, including the underyling bundle the certificate comes from, and the signing and subject data.
1818

19+
.Prerequisites
20+
21+
* This procedure contains optional steps that require that the `python-yq` RPM package is installed.
22+
1923
.Procedure
2024

2125
* Get detailed certificate information by running the following command:
@@ -27,23 +31,27 @@ $ oc get controllerconfig/machine-config-controller -o yaml | yq -y '.status.con
2731
+
2832
.Example output
2933
+
30-
[source,text]
31-
----
32-
"controllerCertificates": [
33-
{
34-
"bundleFile": "KubeAPIServerServingCAData",
35-
"signer": "<signer_data1>",
36-
"subject": "CN=openshift-kube-apiserver-operator_node-system-admin-signer@168909215"
37-
},
38-
{
39-
"bundleFile": "RootCAData",
40-
"signer": "<signer_data2>",
41-
"subject": "CN=root-ca,OU=openshift"
42-
}
43-
]
34+
[source,yaml]
35+
----
36+
- bundleFile: KubeAPIServerServingCAData
37+
notAfter: '2034-10-23T13:13:02Z'
38+
notBefore: '2024-10-25T13:13:02Z'
39+
signer: CN=admin-kubeconfig-signer,OU=openshift
40+
subject: CN=admin-kubeconfig-signer,OU=openshift
41+
- bundleFile: KubeAPIServerServingCAData
42+
notAfter: '2024-10-26T13:13:05Z'
43+
notBefore: '2024-10-25T13:27:14Z'
44+
signer: CN=kubelet-signer,OU=openshift
45+
subject: CN=kube-csr-signer_@1729862835
46+
- bundleFile: KubeAPIServerServingCAData
47+
notAfter: '2024-10-26T13:13:05Z'
48+
notBefore: '2024-10-25T13:13:05Z'
49+
signer: CN=kubelet-signer,OU=openshift
50+
subject: CN=kubelet-signer,OU=openshift
51+
# ...
4452
----
4553
46-
* Get a simpler version of the information found in the ControllerConfig by checking the machine config pool status using the following command:
54+
* Get a simpler version of the information found in the `ControllerConfig` resource by checking the machine config pool status using the following command:
4755
+
4856
[source,terminal]
4957
----
@@ -52,33 +60,51 @@ $ oc get mcp master -o yaml | yq -y '.status.certExpirys'
5260
+
5361
.Example output
5462
+
55-
[source,text]
56-
----
57-
status:
58-
certExpirys:
59-
- bundle: KubeAPIServerServingCAData
60-
subject: CN=admin-kubeconfig-signer,OU=openshift
61-
- bundle: KubeAPIServerServingCAData
62-
subject: CN=kube-csr-signer_@1689585558
63-
- bundle: KubeAPIServerServingCAData
64-
subject: CN=kubelet-signer,OU=openshift
65-
- bundle: KubeAPIServerServingCAData
66-
subject: CN=kube-apiserver-to-kubelet-signer,OU=openshift
67-
- bundle: KubeAPIServerServingCAData
68-
subject: CN=kube-control-plane-signer,OU=openshift
63+
[source,yaml]
64+
----
65+
- bundle: KubeAPIServerServingCAData
66+
expiry: '2034-10-23T13:13:02Z'
67+
subject: CN=admin-kubeconfig-signer,OU=openshift
68+
- bundle: KubeAPIServerServingCAData
69+
expiry: '2024-10-26T13:13:05Z'
70+
subject: CN=kube-csr-signer_@1729862835
71+
- bundle: KubeAPIServerServingCAData
72+
expiry: '2024-10-26T13:13:05Z'
73+
subject: CN=kubelet-signer,OU=openshift
74+
- bundle: KubeAPIServerServingCAData
75+
expiry: '2025-10-25T13:13:05Z'
76+
subject: CN=kube-apiserver-to-kubelet-signer,OU=openshift
77+
# ...
6978
----
7079
+
7180
This method is meant for {product-title} applications that already consume machine config pool information.
7281
73-
* Check which image registry certificates are on the nodes by looking at the contents of the `/etc/docker/cert.d` directory:
82+
* Check which image registry certificates are on the nodes:
83+
+
84+
.. Log in to a node:
85+
+
86+
[source,terminal]
87+
----
88+
$ oc debug node/<node_name>
89+
----
90+
91+
.. Set `/host` as the root directory within the debug shell:
92+
+
93+
[source,terminal]
94+
----
95+
sh-5.1# chroot /host
96+
----
97+
98+
.. Look at the contents of the `/etc/docker/cert.d` directory:
7499
+
75100
[source,terminal]
76101
----
77-
# ls /etc/docker/certs.d
102+
sh-5.1# ls /etc/docker/certs.d
78103
----
79104
+
80105
.Example output
81-
[source,text]
106+
[source,terminal]
82107
----
83-
image-registry.openshift-image-registry.svc.cluster.local:5000 image-registry.openshift-image-registry.svc:5000
108+
image-registry.openshift-image-registry.svc.cluster.local:5000
109+
image-registry.openshift-image-registry.svc:5000
84110
----

0 commit comments

Comments
 (0)