当前位置:网站首页>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
边栏推荐
- Simulate the hundred prisoner problem
- 数值计算方法 Chapter8. 常微分方程的数值解
- 开户复杂吗?网上开户安全么?
- LeetCode笔记:Weekly Contest 300
- U-Net: Convolutional Networks for Biomedical Images Segmentation
- Delete some elements in the array
- Memory management chapter of Kobayashi coding
- ITK Example
- 怎么选择外盘期货平台最正规安全?
- 图扑软件数字孪生 | 基于 BIM 技术的可视化管理系统
猜你喜欢

Simulate the hundred prisoner problem

Ten top automation and orchestration tools

Failed to virtualize table with JMeter

LeetCode 练习——206. 反转链表

Zabbix

Redis基础

mybash

GFS distributed file system

JVM third talk -- JVM performance tuning practice and high-frequency interview question record

Star Ring Technology launched transwarp Navier, a data element circulation platform, to help enterprises achieve secure data circulation and collaboration under privacy protection
随机推荐
职场进阶指南:大厂人必看书籍推荐
Sophon CE Community Edition is online, and free get is a lightweight, easy-to-use, efficient and intelligent data analysis tool
【PaddlePaddle】 PaddleDetection 人脸识别 自定义数据集
OpenShift常用管理命令杂记
Cmake tutorial Step4 (installation and testing)
从类生成XML架构
Elk log analysis system
Which platform of outer disk gold is regular and safe, and how to distinguish it?
Career advancement Guide: recommended books for people in big factories
Matlab reference
Six bad safety habits in the development of enterprise digitalization, each of which is very dangerous!
开户复杂吗?网上开户安全么?
What are the requirements for PMP certification? How much is it?
LeetCode 练习——206. 反转链表
Penetrate the whole intranet through socks agent
Sophon base 3.1 launched mlops function to provide wings for the operation of enterprise AI capabilities
“12306” 的架构到底有多牛逼?
Thesis reading_ Medical NLP model_ EMBERT
第十一届中国云计算标准和应用大会 | 云计算国家标准及白皮书系列发布 华云数据全面参与编制
Tencent music launched its new product "quyimai", which provides music commercial copyright authorization