6 DevOps Openshift Training [ htpasswd user setup ]

Описание к видео 6 DevOps Openshift Training [ htpasswd user setup ]

Create users in OpenShift
-----------------------------------------
https://docs.openshift.com/container-...

htpasswd -c -b -B /etc/origin/master/htpasswd new-user new-password
oc create secret generic htpasswd-secret --from-file=htpasswd=/etc/origin/master/htpasswd -n openshift-config
oc edit oauth cluster

spec:
identityProviders:
name: my_htpasswd_provider
mappingMethod: claim
type: HTPasswd
htpasswd:
fileData:
name: htpasswd-secret

oc get po -n openshift-authentication # to validate the changes applied in oauth cluster resource

oc login https://your-cluster-api:6443 -u username -p password
oc extract secret/htpasswd-secret -n openshift-config --to ./ --confirm
oc set data secret/htpasswd-secret -n openshift-config --from-file ./htpasswd
oc get po -n openshift-authentication -w

Check image push and pull from cluster registry
----------------------------------------------------------------------------
docker logout registry_url
docker login -u username -p $(oc whoami -t) registry_url
docker tag any-local-image registry_url/project-name/image-repo:tag
docker push registry_url/project-name/image-repo:tag

Комментарии

Информация по комментариям в разработке