分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 前端开发

Docker Kubernetes ?查询字段说明

发布时间:2023-09-06 02:24责任编辑:郭大石关键词:Docker

Docker Kubernetes  查询字段说明


  • # 打印受支持的API版本
  • kubectl api-versions 
# 扩展apiextensions.k8s.io/v1beta1# 注册apiregistration.k8s.io/v1beta1# 创建appapps/v1beta1apps/v1beta2# 认证authentication.k8s.io/v1authentication.k8s.io/v1beta1# 授权authorization.k8s.io/v1authorization.k8s.io/v1beta1# 弹性伸缩autoscaling/v1autoscaling/v2beta1# 批量batch/v1batch/v1beta1certificates.k8s.io/v1beta1# 证书extensions/v1beta1# 网络networking.k8s.io/v1# 策略policy/v1beta1# 控制rbac.authorization.k8s.io/v1rbac.authorization.k8s.io/v1beta1# 存储storage.k8s.io/v1storage.k8s.io/v1beta1v1

  • # 查看service 详细信息
  • kubectl describe service 资源名
# 服务名称Name: ?????????????nginx# 命名空间Namespace: ????????default# 标签Labels: ???????????run=nginxAnnotations: ??????<none># 标签Selector: ?????????run=nginx# 网络代理类型Type: ?????????????ClusterIP# 集群唯一IPIP: ???????????????10.10.10.17# Service端口Port: ?????????????<unset> ?88/TCP# 容器端口TargetPort: ???????80/TCP# 代理容器IPEndpoints: ????????172.17.1.2:80,172.17.2.2:80,172.17.2.3:80

注:kubernetes默认负载均衡模式为ClusterIP。

注:标签主要是识别资源的描述符号。

注:显示集群信息 kubectl cluster-info 显示运行API情况。


  • # 查看容器详细信息
  • kubectl describe pod 容器名
# 容器名称Name: ??????????hello-world-cc85d4fb6-9lnt9# 命名空间Namespace: ?????default# 分配节点IPNode: ??????????192.168.1.77/192.168.1.77# 启动时间Start Time: ????Thu, 15 Nov 2018 11:59:33 +0800# 标签名称,系统生成标签Labels: ????????app=example ???????????????pod-template-hash=774180962# 注释Annotations: ???kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"default","name":"hello-world-cc85d4fb6","uid":"dc7d20d1-e88a-11e8-91e0-000c29e1b1...# 状态Status: ????????Running# 分配容器IPIP: ????????????172.17.1.3# 由RS进行管理Created By: ????ReplicaSet/hello-world-cc85d4fb6Controlled By: ?ReplicaSet/hello-world-cc85d4fb6# 容器信息Containers: ?hello-world:# 容器ID ???Container ID: ??docker://b05c00a8a840e8cf0ee4499ee9244282d500acf28ede13c76ff62c62baaa2057# 镜像版本号 ???Image: ?????????nginx:1.10 ???Image ID: ??????docker-pullable://nginx@sha256:6202beb06ea61f44179e02ca965e8e13b961d12640101fca213efbfd145d7575# 开放端口 ???Port: ??????????80/TCP# 运行状态 ???State: ?????????Running ?????Started: ?????Thu, 15 Nov 2018 12:00:04 +0800 ???Ready: ?????????True ???Restart Count: ?0 ???Environment: ???<none> ???Mounts: ????????<none># 容器信息Conditions: ?Type ??????????Status ?Initialized ???True ??Ready ?????????True ??PodScheduled ??True Volumes: ????????<none>QoS Class: ??????BestEffortNode-Selectors: ?<none>Tolerations: ????<none>Events: ?????????<none>

  •  # 显示有关Deployments详细信息
  • kubectl describe deployments 资源名
# 服务名称Name: ??????????????????hello-world# 命名空间名称,一个命名空间相当与一个虚拟集群Namespace: ?????????????defaultCreationTimestamp: ?????Thu, 15 Nov 2018 11:59:33 +0800# 加入一个标签Labels: ????????????????app=example# 注释Annotations: ???????????deployment.kubernetes.io/revision=1# 标签选择器Selector: ??????????????app=example# 副本数Replicas: ??????????????3 desired | 3 updated | 3 total | 3 available | 0 unavailableStrategyType: ??????????RollingUpdateMinReadySeconds: ???????0RollingUpdateStrategy: ?1 max unavailable, 1 max surge# pod模板Pod Template: ?Labels: ?app=example ?Containers: ??hello-world:# 容器镜像版本 ???Image: ???????nginx:1.10# 容器端口 ???Port: ????????80/TCP ???Environment: ?<none> ???Mounts: ??????<none> ?Volumes: ???????<none>Conditions: ?Type ??????????Status ?Reason ?---- ??????????------ ?------# 执行时间记录 ?Available ?????True ???MinimumReplicasAvailableOldReplicaSets: ?<none>NewReplicaSet: ??hello-world-cc85d4fb6 (3/3 replicas created)Events: ?????????<none>

Docker Kubernetes ?查询字段说明

原文地址:https://www.cnblogs.com/xiangsikai/p/10019336.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved