当前位置:网站首页>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
边栏推荐
- 神经网络自我认知模型
- Daily exercise: a series of dates
- Access the database and use redis as the cache of MySQL (a combination of redis and MySQL)
- 开户复杂吗?网上开户安全么?
- Cmake tutorial Step3 (requirements for adding libraries)
- 2022新版PMP考试有哪些变化?
- Neural network self cognition model
- GFS distributed file system
- 基于YOLOv3的口罩佩戴检测
- 在一台服务器上部署多个EasyCVR出现报错“Press any to exit”,如何解决?
猜你喜欢
随机推荐
Redis基础
南京大学:新时代数字化人才培养方案探讨
Introduction to Resampling
mybash
2022新版PMP考试有哪些变化?
RSE2020/云检测:基于弱监督深度学习的高分辨率遥感图像精确云检测
【PaddlePaddle】 PaddleDetection 人脸识别 自定义数据集
Cmake tutorial step1 (basic starting point)
Easynmon Usage Summary
修复漏洞 - mysql 、es
Simulate the hundred prisoner problem
Sophon KG升级3.1:打破数据间壁垒,解放企业生产力
Cmake tutorial Step4 (installation and testing)
Mask wearing detection based on yolov3
Crontab 日志:如何记录我的 Cron 脚本的输出
Generate classes from XML schema
Teamcenter 消息注册前操作或后操作
较文心损失一点点性能提升很多
[performance test] full link voltage test
nano的CAN通信