@@ -16,6 +16,10 @@ The MCC also handles the image registry certificates and its associated user bun
16
16
17
17
You can get information about the listed certificates, including the underyling bundle the certificate comes from, and the signing and subject data.
18
18
19
+ .Prerequisites
20
+
21
+ * This procedure contains optional steps that require that the `python-yq` RPM package is installed.
22
+
19
23
.Procedure
20
24
21
25
* 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
27
31
+
28
32
.Example output
29
33
+
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
+ # ...
44
52
----
45
53
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:
47
55
+
48
56
[source,terminal]
49
57
----
@@ -52,33 +60,51 @@ $ oc get mcp master -o yaml | yq -y '.status.certExpirys'
52
60
+
53
61
.Example output
54
62
+
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
+ # ...
69
78
----
70
79
+
71
80
This method is meant for {product-title} applications that already consume machine config pool information.
72
81
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:
74
99
+
75
100
[source,terminal]
76
101
----
77
- # ls /etc/docker/certs.d
102
+ sh-5.1 # ls /etc/docker/certs.d
78
103
----
79
104
+
80
105
.Example output
81
- [source,text ]
106
+ [source,terminal ]
82
107
----
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
84
110
----
0 commit comments