Last active
June 17, 2019 15:13
-
-
Save welshstew/67ee02ef3a53a048394370c56481de31 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
htpasswd -c -B -b users.htpasswd user1 password1! | |
htpasswd -B -b users.htpasswd user2 password2! | |
htpasswd -B -b users.htpasswd user3 password3! | |
htpasswd -B -b users.htpasswd user4 password4! | |
htpasswd -B -b users.htpasswd user5 password5! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "apiVersion: config.openshift.io/v1 | |
kind: OAuth | |
metadata: | |
name: cluster | |
spec: | |
identityProviders: | |
- name: my_htpasswd_provider | |
mappingMethod: claim | |
type: HTPasswd | |
htpasswd: | |
fileData: | |
name: htpass-secret | |
" | oc replace -f - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oc delete secret htpass-secret -n openshift-config | |
oc create secret generic htpass-secret --from-file=htpasswd=users.htpasswd -n openshift-config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user@somehost temp]$ oc get routes -n openshift-console | |
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD | |
console console-openshift-console.apps-crc.testing console https reencrypt/Redirect None | |
downloads downloads-openshift-console.apps-crc.testing downloads http edge None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oc adm policy add-cluster-role-to-user cluster-admin user1 --rolebinding-name=cluster-admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment