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
:set nolbr " Short for :set nolinebreak |
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
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | |
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation | |
ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in | |
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur | |
sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id | |
est laborum. |
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
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incid | |
idunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exerci | |
tation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure do | |
lor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. | |
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt m | |
ollit anim id est laborum. |
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
:set wrap | |
:set linebreak |
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
#!/usr/bin/env bash | |
TOKEN="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" | |
CACERT="/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" | |
NAMESPACE="$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)" | |
# Get Service's NodePort by label. Label in example is "cvhid=abcd-1234" | |
curl \ | |
--silent \ | |
--header "Authorization: Bearer ${TOKEN}" \ |
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
- Basic structure | |
- oc <verb> <noun> [name] | |
- There are some exceptions, like `oc help` or `oc logs <pod>` or `oc exec` | |
- Most commands support `oc <command> --help` | |
- Common resources (nouns) | |
- Pods | |
- Deployments | |
- Services | |
- Routes | |
- ConfigMaps |
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
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: basic-ocp-demo | |
name: basic-ocp-demo | |
spec: | |
replicas: 1 | |
selector: |
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
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: basic-ocp-demo | |
name: basic-ocp-demo | |
spec: | |
replicas: 1 | |
selector: |
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
#!/usr/bin/env bash | |
# | |
# To use, simply run `digall <domain>` such as: | |
# | |
# digall example.com | |
# digall sub.example.com | |
# | |
# Place this file in your PATH. Suggest either /usr/local/bin/ or ~/bin | |
# |
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
#!/usr/bin/env bash | |
# Versoin one | |
oc get $(oc api-resources --namspaced=true | tail -n+2 | awk '{ print $1 }' | xargs | sed -e 's/\s/,/g') | |
# Version two (from https://access.redhat.com/solutions/4165791) | |
oc api-resources --verbs=list --namespaced -o name | xargs -n 1 oc get --show-kind --ignore-not-found -n $PROJECT_NAME |