您的位置:首页 > 其它

k8s查看pod的命令

2020-01-12 17:47 489 查看

kubectl get pod

参数解析

NAME pod名

READY 准备好的副本数

STATUS 状态

RESTARTS 重启

AGE 已经运行的时间

查看pod资源(较详细)

kubectl get pod -o wide

参数解析

IP ip地址

NODE 运行节点

NOMINATED NODE 指定节点

查看pod资源(非常详细)

kubectl describe pod

参数解析

Name pod 名

Namespace 命名空间

Priority 优先

PriorityClassName 优先级名

Node 节点

Start Time 启动时间

Selector 调度规则

Labels 标签

Annotations 注释

Status 状态

IP ip地址

Controller By 指明是由replicaset创建

Containers 容器信息

Conditions 条件

Volumes 数据卷信息

Qos Class

Node Selectors 节点选择

Tolerations 反亲和性

Events: Deployment的执行日志

kubectl 命令详解 label

例如添加磁盘类型label

kubectl label node compute1 disktype=xfs

查看节点的label

kubectl get node --show-labels

删除添加的label

kubectl label node compute1 disjtype-

kubectl 命令详解 - Job

工作类容器 Job

服务类容器 Deployment,RelicaSet,DaemonSet

区别

工作类容器 一次性任务,完成之后便退出

服务类容器 持续提供服务,一直运行

查看job资源(简略)

kubectl get job

NAME job名

COMPLETIONS 已完成

DURATION 总共持续的时间

AGE job运行的时间

查看job资源(较详细)

kubectl get job -o wide

CONTAINERS 容器名

IMAGES 镜像名

SELECTOR 选择的controller-uid

查看job资源(非常详细)

kubectl describe job

Name job 名

Namespace 命名空间

Selector 调度

Labels 标签

Annotations 注释

Completions 设置完成Pod的总数

Parallelism 并行的Pod数量

Start Time 启动时间

Complated At 完成时间

Duration 耗时

Pods Statuses Pod运行状态

Pods Templates Pod模板

Events: Deployment的执行日志

  • 点赞
  • 收藏
  • 分享
  • 文章举报
fake_coder 发布了6 篇原创文章 · 获赞 0 · 访问量 220 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: