当前位置:网站首页>Notes on common management commands of openshift
Notes on common management commands of openshift
2022-07-05 18:03:00 【Ben returns from flying goose treading the snow】
oc status--- check current namespace status
oc project ibm-common-services --- switch to the namespace/project ibm-common-services
oc get pods -o wide --- list all pods in current namespace in details,-o wide flags to view the pod IP address and the node where the pod is located.
READY --- means how many containers in this pod are considered ready
STATUS --- RUNNING: the Pod has been bound to a node, and all of the containers
have been created. At least one container is still running, or is in the
process of starting or restarting.
--- Completed:inside pod’s container process has been successfully
completed and no more process left for completion.
--- PENDING:The Pod has been accepted by the Kubernetes cluster, but
one or more of the containers has not been set up and made ready to
run. This includes time a Pod spends waiting to be scheduled as well
as the time spent downloading container images over the network.
--- Unknown:For some reason the state of the Pod could not be obtained.
This phase typically occurs due to an error in communicating with
the node where the Pod should be running.
--- Failed:All containers in the Pod have terminated, and at least
one container has terminated in failure. That is, the container
either exited with non-zero status or was terminated by the system.oc get pods --field-selector=status.phase=Succeeded -n ibm-common-services --- list all Completed pods
oc get pod --no-headers --all-namespaces -o wide| grep -Ev '([[:digit:]])/\1.*R' | grep -v 'Completed' --- This command can filter out the problematic pod
oc get pod my-pod -o yaml --- Get a pod's YAML, Later, if jsonpath Specify only what you want to list , The expression after the equal sign can be read first pod yaml Content
oc adm top pods -n ibm-common-services --- display CPU, memory and storage usage statistics about pods
oc logs -f <pod_name> -c <container_name> --- View the log for a specific pod
oc exec ibm-cpd-wkc-operator-59f7d8cd45-nds4n -- ls -ahl /var/log --- List log files and subdirectories contained in /var/log within a pod
oc rsh ibm-cpd-wkc-operator-59f7d8cd45-nds4n --- start a remote access into a pod.If a pod has multiple containers, oc rsh defaults to the first container unless -c <container_name> is specified.
oc cp <local_path> <pod_name>:/<path> -c <container_name> --- Copy a file to a pod.
oc cp <pod_name>:/<path> -c <container_name><local_path> --- Copy a file from a pod.
oc get pods ibm-cpd-wkc-operator-59f7d8cd45-nds4n -o jsonpath='{.spec.containers[*].name}' --- list all container names defined in a pod spec.
oc get pod -l icpdsupport/addOnId=wkc --- list wkc related pods only
oc get ibmcpd ibmcpd-cr -o yaml > ibmcpd-cr.yaml export pod yaml file
oc apply -f ibmcpd-cr.yaml --overwrite=true to update pod yaml file
oc get pods -l component=zen-watcher List the same label All of the pod
oc delete pods -l component=zen-watcher Delete Hit the same label All of the pod
Ongoing update
边栏推荐
- Zabbix
- To solve the stubborn problem of Lake + warehouse hybrid architecture, xinghuan Technology launched an independent and controllable cloud native Lake warehouse integrated platform
- About Statistical Power(统计功效)
- U-Net: Convolutional Networks for Biomedical Images Segmentation
- Leetcode exercise - 206 Reverse linked list
- 第十一届中国云计算标准和应用大会 | 华云数据成为全国信标委云计算标准工作组云迁移专题组副组长单位副组长单位
- How can cluster deployment solve the needs of massive video access and large concurrency?
- Star ring technology data security management platform defender heavy release
- Sophon kg upgrade 3.1: break down barriers between data and liberate enterprise productivity
- 基于YOLOv3的口罩佩戴检测
猜你喜欢
随机推荐
How can cluster deployment solve the needs of massive video access and large concurrency?
通过SOCKS代理渗透整个内网
Elk log analysis system
Introduction to Resampling
Eliminate the writing of 'if () else{}'
Ten top automation and orchestration tools
Zabbix
吳恩達團隊2022機器學習課程,來啦
Check namespaces and classes
记一次使用Windbg分析内存“泄漏”的案例
Maximum artificial island [how to make all nodes of a connected component record the total number of nodes? + number the connected component]
使用QT遍历Json文档及搜索子对象
EPM related
Cmake tutorial Step3 (requirements for adding libraries)
EasyCVR平台通过接口编辑通道出现报错“ID不能为空”,是什么原因?
Configure pytorch environment in Anaconda - win10 system (small white packet meeting)
Introduction to VC programming on "suggestions collection"
Tencent music launched its new product "quyimai", which provides music commercial copyright authorization
Binder开辟线程数过多导致主线程ANR异常
LeetCode笔记:Weekly Contest 300









