Skip to content

Commit b71e5dd

Browse files
committed
Add note about an potential issue with node certificates when updating from pre 1.0.8 releases.
1 parent 3059a87 commit b71e5dd

File tree

2 files changed

+124
-0
lines changed

2 files changed

+124
-0
lines changed

install_config/cluster_metrics.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ endif::[]
5252

5353
== Before You Begin
5454

55+
ifdef::openshift-origin[]
56+
[WARNING]
57+
====
58+
If your OpenShift installation was originally performed on a version previous to
59+
v1.0.8, even if it has since been updated to a newer version, you will need to
60+
follow these steps outlined in the
61+
link:upgrades.html#openshift-origin-pre-1-0-8-certificate-update[update]
62+
document. If the node certificate does not contain the IP address of the node, then Heapster
63+
will fail to retrieve any metrics.
64+
====
65+
endif::[]
66+
5567
The components for cluster metrics must be deployed to the `openshift-infra`
5668
project. This allows link:../dev_guide/pod_autoscaling.html[horizontal pod autoscalers]
5769
to discover the heapster service and use it to retrieve metrics that can be used

install_config/upgrades.adoc

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,4 +1091,116 @@ Modify the *_/etc/origin/master/scheduler.json_* file to add the `*kind*` and
10911091
====
10921092
<1> Add `*"kind": "Policy",*`
10931093
<2> Add `*"apiVersion": "v1",*`
1094+
1095+
[[openshift-origin-pre-1-0-8-certificate-update]]
1096+
==== OpenShift Origin Pre 1.0.8 Installation and Kubelet Certificates
1097+
1098+
The following steps may be required for any OpenShift instance which was originally installed
1099+
previous to the https://github.com/openshift/origin/releases[OpenShift Origin 1.0.8 release].
1100+
This may include any and all updates from that version.
1101+
1102+
With the 1.0.8 release, the certificates for each of the kubelet nodes were updated to include
1103+
the IP address of the node. Any node certificates generated before the 1.0.8 release may not
1104+
contain the IP address of the node.
1105+
1106+
If a node is missing the IP address as part of its certificate, clients may refuse to connect
1107+
to the kubelet endpoint. Usually this will result in errors about the certificate not containing
1108+
an `IP SAN`
1109+
1110+
In order to remedy this situation, you may need to manually update the certificates for your node.
1111+
1112+
*Checking the Node's Certificate*
1113+
1114+
The follow command can be used to determine what subject alt names are already in place for the
1115+
node's serving certificate:
1116+
1117+
====
1118+
----
1119+
# openssl x509 -in /etc/origin/node/server.crt -text -noout | grep -A 1 "Subject Alternative Name"
1120+
----
1121+
====
1122+
1123+
If the output shows:
1124+
====
1125+
----
1126+
X509v3 Subject Alternative Name:
1127+
DNS:mynode, DNS:mynode.mydomain.com, IP: 1.2.3.4
1128+
----
1129+
====
1130+
1131+
then your subject alt names are:
1132+
====
1133+
----
1134+
mynode
1135+
mynode.mydomain.com
1136+
1.2.3.4
1137+
----
1138+
====
1139+
1140+
You will now need to check that the `nodeIP` value in the *_/etc/origin/node/node-config.yaml_* configuration file. If this value
1141+
does not match one of the IP values from the subject alternative names determined in the previous step then it will need to be added to the node's certificate.
1142+
1143+
If the `nodeIP` value is already contained within the subject alternative names, then no further steps are required.
1144+
1145+
You will need to know the `Subject Alternative Names` and `nodeIP` value for the following steps.
1146+
1147+
1148+
*Generating a New Node Certificate*
1149+
1150+
If your current node certificate do not contain the proper IP address, then you will need to regenerate a new certificate for your node.
1151+
1152+
We will perform the following commands from a temporary directory:
1153+
1154+
====
1155+
----
1156+
# mkdir /tmp/node_certificate_update
1157+
# cd /tmp/node_certificate_update
1158+
----
1159+
====
1160+
1161+
First we will export a variable to contain all our signing options:
1162+
====
1163+
----
1164+
# export signing_opts="--signer-cert=/etc/origin/master/ca.crt --signer-key=/etc/origin/master/ca.key --signer-serial=/etc/origin/master/ca.serial.txt"
1165+
----
1166+
====
1167+
1168+
Then we need to generate the new certificate
1169+
1170+
====
1171+
----
1172+
# oadm ca create-server-cert --cert=server.crt --key=server.key $signing_opts --hostnames=<existing subject alt names>,<nodeIP>
1173+
----
1174+
====
1175+
1176+
For example, if the `Subject Alternative Name` from before was _mynode,mynode.mydomain.com,1.2.3.4_ and the `nodeIP` was 10.10.10.1, then
1177+
you will need to run the following command:
1178+
====
1179+
----
1180+
# oadm ca create-server-cert --cert=server.crt --key=server.key $signing_opts --hostnames=mynode,mynode.mydomain.com,1.2.3.4,10.10.10.1
1181+
----
1182+
====
1183+
1184+
*Replace Node Serving Certificates*
1185+
1186+
Back up the existing *_/etc/origin/node/server.crt_* and *_/etc/origin/node/server.key_* file for your node:
1187+
1188+
====
1189+
----
1190+
# mv /etc/origin/node/server.crt /etc/origin/node/server.crt.bak
1191+
# mv /etc/origin/node/server.key /etc/origin/node/server.key.bak
1192+
----
1193+
====
1194+
1195+
You will now need to copy the new *_server.crt_* and *_server.key_* created in the temporary directory during the previous step
1196+
1197+
====
1198+
----
1199+
# mv /tmp/node_certificate_update/server.crt /etc/origin/node/server.crt
1200+
# mv /tmp/node_certificate_update/server.key /etc/origin/node/server.key
1201+
----
1202+
====
1203+
1204+
After you have replaced the node's certificate, you will now need to restart the node service.
10941205
endif::[]
1206+

0 commit comments

Comments
 (0)