当前位置:网站首页>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
边栏推荐
- [paddlepaddle] paddedetection face recognition custom data set
- Xiaobai getting started with NAS - quick building private cloud tutorial series (I) [easy to understand]
- Sophon CE社区版上线,免费Get轻量易用、高效智能的数据分析工具
- [performance test] full link voltage test
- Six bad safety habits in the development of enterprise digitalization, each of which is very dangerous!
- Sophon kg upgrade 3.1: break down barriers between data and liberate enterprise productivity
- 检查命名空间和类
- ISPRS2020/云检测:Transferring deep learning models for cloud detection between Landsat-8 and Proba-V
- 登录连接 CDB 和 PDB
- Compared with the loss of Wenxin, the performance is improved a lot
猜你喜欢

使用Jmeter虚拟化table失败

pytorch yolov5 训练自定义数据

职场进阶指南:大厂人必看书籍推荐

LeetCode每日一题:合并两个有序数组

Le cours d'apprentissage de la machine 2022 de l'équipe Wunda arrive.

“12306” 的架构到底有多牛逼?

Binder开辟线程数过多导致主线程ANR异常

Configure pytorch environment in Anaconda - win10 system (small white packet meeting)

PMP认证需具备哪些条件啊?费用多少啊?

RSE2020/云检测:基于弱监督深度学习的高分辨率遥感图像精确云检测
随机推荐
基于YOLOv3的口罩佩戴检测
U-Net: Convolutional Networks for Biomedical Images Segmentation
LeetCode 练习——206. 反转链表
「运维有小邓」用于云应用程序的单点登录解决方案
JVM第三话 -- JVM性能调优实战和高频面试题记录
修复漏洞 - mysql 、es
nacos -分布式事务-Seata** linux安装jdk ,mysql5.7启动nacos配置ideal 调用接口配合 (保姆级细节教程)
Sophon CE社区版上线,免费Get轻量易用、高效智能的数据分析工具
ISPRS2022/雲檢測:Cloud detection with boundary nets基於邊界網的雲檢測
Redis基础
Sophon autocv: help AI industrial production and realize visual intelligent perception
Leetcode exercise - 206 Reverse linked list
多线程(一) 进程与线程
ELK日志分析系统
Find the first k small element select_ k
Mask wearing detection based on yolov3
Cmake tutorial Step4 (installation and testing)
Anaconda中配置PyTorch环境——win10系统(小白包会)
第十一届中国云计算标准和应用大会 | 云计算国家标准及白皮书系列发布 华云数据全面参与编制
【PaddlePaddle】 PaddleDetection 人脸识别 自定义数据集