- Cluster Quota
oc create clusterquota env-qa \
--project-label-selector environment=qa \
--hard pods=10,services=5
oc create clusterquota user-qa \
# Install OpenShift 3.11 cli | |
brew install https://raw.githubusercontent.com/cblecker/homebrew-core/d1092419e5113b296a6b1d7ecd2bf6673d39f0a2/Formula/openshift-cli.rb | |
# ID = /var/lib/origin/openshift.local.volumes/plugins/kubernetes.io/cinder/mounts/[ID] | |
oc get pv -o json | jq -r '[.items[] | {name:.spec.claimRef.name, namespace:.spec.claimRef.namespace, volumeID:.spec.cinder.volumeID}]' | grep -n2 [ID] | |
# ElasticSearch get incides | |
oc -n openshift-logging rsh $(oc -n openshift-logging get po -l component=es -o name) es_util --query=_cat/indices -XCURL |
$ FILE=/some/path/to/file.txt | |
################################### | |
### Remove matching suffix pattern | |
################################### | |
$ echo ${FILE%.*} # remove ext | |
/some/path/to/file | |
$ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts |