Skip to content

Commit 41c4b4e

Browse files
committed
Allow SSH-ing into nodes
Signed-off-by: Johanan Liebermann <[email protected]>
1 parent 3111bb1 commit 41c4b4e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

templates/cluster-template-lb-flatcar-kccm.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,12 @@ spec:
241241
[Unit]
242242
Requires=containerd.service
243243
After=containerd.service
244+
# The CAPK automatic SSH key authorization doesn't work for Ignition as it assumes cloud-init
245+
# is used. We need to explicitly add a key to be able to SSH into cluster nodes.
246+
users:
247+
- name: core
248+
sshAuthorizedKeys:
249+
- "${SSH_AUTHORIZED_KEY}"
244250
---
245251
apiVersion: cluster.x-k8s.io/v1beta1
246252
kind: MachineDeployment

templates/cluster-template-lb-flatcar.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,12 @@ spec:
241241
[Unit]
242242
Requires=containerd.service
243243
After=containerd.service
244+
# The CAPK automatic SSH key authorization doesn't work for Ignition as it assumes cloud-init
245+
# is used. We need to explicitly add a key to be able to SSH into cluster nodes.
246+
users:
247+
- name: core
248+
sshAuthorizedKeys:
249+
- "${SSH_AUTHORIZED_KEY}"
244250
---
245251
apiVersion: cluster.x-k8s.io/v1beta1
246252
kind: MachineDeployment

0 commit comments

Comments
 (0)