Skip to content

help

kubectl --help
kubectl create --help

Cluster info

# Print the supported API versions on the server
kubectl api-versions

# Print the supported API resources on the server
kubectl api-resources
# API-Group/API-Version - API-Group is blank for Kubernetes core resources
# KIND - the formal Kubernetes resource schema type

# Display addresses of the control plane and services
kubectl cluster-info

get

retrieves information about resources in the selected project

oc get clusteroperator # [-o yaml | json]
kubectl get all --show-kind
kubectl get pods -o wide
kubectl get pods \
-o custom-columns=PodName:".metadata.name",\
ContainerName:"spec.containers[].name",\

explain

provides detailed information about the attributes of a given resource type

kubectl explain pods
kubectl explain pods.spec

describe

provides detailed information about a given resource

kubectl describe mysql-openshift-1-glgrp

logs

Container logs are the standard output (stdout) and standard error (stderr) output of a container

kubectl logs mysql-kd13 -c container-name

Other commands

oc create -f pod.yaml
oc delete

OC specific commands

oc login cluster-url
oc new-project myapp
oc status

oc adm

```sh

oc adm top pods -A --sum