I’d like to be able to login to my cluster directly, without needing access to Rancher.
I’ve read about enabling ACE but struggle with implementing it.
The documentation states that you should tweak some config files on the control-plane nodes - so I figured I could use cloud-init to do that:
#cloud-config
write_files:
- path: /var/lib/rancher/rke2/kube-api-authn-webhook.yaml
content: |
apiVersion: v1
kind: Config
clusters:
- name: Default
cluster:
insecure-skip-tls-verify: true
server: http://127.0.0.1:6440/v1/authenticate
users:
- name: Default
user:
insecure-skip-tls-verify: true
current-context: webhook
contexts:
- name: webhook
context:
user: Default
cluster: Default
- path: /etc/rancher/rke2/config.yaml
content: |
kube-apiserver-arg:
- authentication-token-webhook-config-file=/var/lib/rancher/rke2/kube-api-authn-webhook.yaml
It seems however to work poorly, as node got stuck reconciling over night:
How am I supposed to make the setting part of the image? The node is based on a jammy ubuntu cloud image.