Sergio Moretto blog

Appunti sparsi

Creare nuovi utenti su CRC OpenShift

Posted at — Jan 11, 2020

Creare il file htpasswd con gli utenti previsti:

htpasswd -c -B -b htpasswd admin admin1
htpasswd -B -b htpasswd user1 password1
htpasswd -B -b htpasswd user2 password2

Rigenero il secret delle password:

oc create secret generic htpass-secret --from-file=htpasswd \
    -n openshift-config --dry-run -o yaml > htpass-secret.yaml
oc replace -f htpass-secret.yaml

Attendo che i pod di oauth-openshift ripartano automaticamente:

oc get pods -n openshift-authentication

Abilito l'utente admin come cluster-admin:

oc adm policy add-cluster-role-to-user cluster-admin admin

Cancello l'utenza kubeadmin:

oc delete secrets kubeadmin -n kube-system
comments powered by Disqus