helm
helm copied to clipboard
Install for Remote Outpost on K8S needs updating
Describe the bug When installing a Remote Outpost (see following link) via Helm, the post install script generate will not work with Kubernetes >= v1.2.4, as K8S no longer automatically generates User Tokens, so a step needs to be added to this, in addition, this seems to break the current method of getting the CA.
To Reproduce
-
Install the remote output using the
helm install my-authentik-remote-cluster goauthentik/authentik-remote-cluster --version <CHART-VERSION>
-
A script will be outputted, that will generate the YML to import into Authentik
** Possible Alternative Script **
I've made some modifications to the original script, which now works with v1.2.4:
# your server name goes here
KUBE_API=https://localhost:8443
SERVICE_ACCOUNT=svr-authentik-authentik-remote-cluster
KUBE_CA=$(kubectl config view --minify --raw --output 'jsonpath={..cluster.certificate-authority-data}')
KUBE_TOKEN=$(kubectl create token $SERVICE_ACCOUNT )
echo "apiVersion: v1
kind: Config
clusters:
- name: default-cluster
cluster:
certificate-authority-data: ${KUBE_CA}
server: ${KUBE_API}
contexts:
- name: default-context
context:
cluster: default-cluster
namespace: default
user: authentik-user
current-context: default-context
users:
- name: authentik-user
user:
token: ${KUBE_TOKEN}"
The old script still probably works with < v1.24, so you may want to just output this in addition, with a message basically saying "If your using v1.24+ then use this instead:"
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.