Commit a57955c
committed
Fix control-plane join failing with empty certificate key
The previous approach ran `kubeadm init phase upload-certs --upload-certs`
and piped the output through `2>/dev/null | tail -1` to extract the
certificate key. This broke because kubeadm prints informational
`[upload-certs]` lines to stdout (not stderr), so `2>/dev/null` had no
effect on them, and `tail -1` could grab a trailing empty line instead
of the actual 64-char hex key.
Fix by generating the key separately with `kubeadm certs certificate-key`
which outputs only the key, then passing it explicitly to
`kubeadm init phase upload-certs --upload-certs --certificate-key <key>`.
Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent fdfdc86 commit a57955c
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | | - | |
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
149 | 148 | | |
150 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| |||
0 commit comments