Skip to content

Instantly share code, notes, and snippets.

@guaxinim
Last active June 25, 2019 19:24
Show Gist options
  • Save guaxinim/8af596fdaf25de17e63c3f96409656cd to your computer and use it in GitHub Desktop.
Save guaxinim/8af596fdaf25de17e63c3f96409656cd to your computer and use it in GitHub Desktop.
Openshift / Kubernetes
Listar logs e recursos de um DC, Pod
oc adm top pods --all-namespaces
oc get dc --all-namespaces -o jsonpath='{range .items[*]}{"NAMESPACE: "}{@.metadata.namespace}{" DeploymentConfig: "}{@.spec.selector.deploymentconfig}{" Request CPU: "}{@.spec.template.spec.containers[].resources.requests.cpu}{" Request MEMORIA: "}{@.spec.template.spec.containers[].resources.requests.memory}{" Limit CPU: "}{@.spec.template.spec.containers[].resources.limits.cpu}{" Limit MEMORIA: "}{@.spec.template.spec.containers[].resources.limits.memory}{"\n"}{end}'
Comandos uteis
oc api-resources
oc explain <object>
oc explain dc.spec
oc explain dc recursive=true
oc get events --sort-by='.lastTimestamp'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment