Last active
July 19, 2021 22:07
-
-
Save cdoan1/d793fa8480c980e0d27bd4a4de4bf0ba to your computer and use it in GitHub Desktop.
This file contains 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
# get CRD sorted | |
oc get crd -A --sort-by=.metadata.creationTimestamp | |
# inline template | |
oc get route keycloak --template "http://{{.spec.host}} " | |
# Enable DEX | |
oc patch subscription.operators openshift-gitops-operator -n openshift-operators \ | |
--type=merge -p='{"spec":{"config":{"env":[{"name":"DISABLE_DEX","Value":"false"}]}}}' | |
oc patch subscription.operators openshift-gitops-operator -n openshift-operators \ | |
--type=merge -p='{"spec":{"dex":{"openShiftOAuth":true},"rbac":{"defaultPolicy":"role:readonly","policy":"g, system:cluster-admins, role:admin","scopes":"[groups]"}}}' | |
# Forward a internal service | |
``` | |
sudo kubefwd svc -n openshift-monitoring -d openshift-monitoring.svc -l prometheus=k8s | |
curl --cert k8s.crt --key k8s.key -k 'https://prometheus-k8s.openshift-monitoring.svc:9091/metrics' | |
``` | |
oc patch subscription.operators openshift-gitops-operator -n openshift-operators \ | |
--type=merge -p='{"spec":{"server":{"insecure":true,"route":{"enabled":true,"tls":{"insecureEdgeTerminationPolicy":"Redirect","termination":"edge"}}}}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment