k8s查看pod的yaml文件_跟Marko学习k8s--查看现有pod的YAML描述文件

#kubectl get pods

#kubectl get po httpd-gv4bl -o yaml

apiVersion: v1 --YAML描述文件所使用的Kubernetes API版本

kind: Pod --Kubernetes 对象资源

metadata: --pod元数据(名称、标签和注解)

creationTimestamp: 2019-09-03T06:05:16Z

generateName: httpd-

labels:

run: httpd

name: httpd-gv4bl

namespace: default

ownerReferences:

- apiVersion: v1

blockOwnerDeletion: true

controller: true

kind: ReplicationController

name: httpd

uid: 049ce8c5-035b-4422-a3b0-40e814d5c820

resourceVersion: "1640"

selfLink: /api/v1/namespaces/default/pods/httpd-gv4bl

uid: b032b3bd-b42f-476a-b5fa-93121169fc7b

spec: --pod规格/内容(pod的容器列表、volume)

containers:

- image: httpd

imagePullPolicy: Always

name: httpd

ports:

- containerPort: 80

protocol: TCP

resources: {}

terminationMessagePath: /dev/termination-log

terminationMessagePolicy: File

volumeMounts:

- mountPath: /var/run/secrets/kubernetes.io/serviceaccount

name: default-token-mrn2n

readOnly: true

dnsPolicy: ClusterFirst

enableServiceLinks: true

nodeName: minikube

priority: 0

restartPolicy: Always

schedulerName: default-scheduler

securityContext: {}

serviceAccount: default

serviceAccountName: default

terminationGracePeriodSeconds: 30

tolerations:

- effect: NoExecute

key: node.kubernetes.io/not-ready

operator: Exists

tolerationSeconds: 300

- effect: NoExecute

key: node.kubernetes.io/unreachable

operator: Exists

tolerationSeconds: 300

volumes:

- name: default-token-mrn2n

secret:

defaultMode: 420

secretName: default-token-mrn2n

status: --pod及其内部容器的详细状态

conditions:

- lastProbeTime: null

lastTransitionTime: 2019-09-03T06:05:16Z

status: "True"

type: Initialized

- lastProbeTime: null

lastTransitionTime: 2019-09-03T06:07:54Z

status: "True"

type: Ready

- lastProbeTime: null

lastTransitionTime: 2019-09-03T06:07:54Z

status: "True"

type: ContainersReady

- lastProbeTime: null

lastTransitionTime: 2019-09-03T06:05:16Z

status: "True"

type: PodScheduled

containerStatuses:

- containerID: docker://0ed3b5ef7bf2de481f26d23b9a431094412443db004ea04c6e57d9157baf8e1b

image: httpd:latest

imageID: docker-pullable://httpd@sha256:98caed3e3a90ed9db8d25dcbb98eebe0ce56358a9dbbc940d7eb66a8e2b88252

lastState: {}

name: httpd

ready: true

restartCount: 0

state:

running:

startedAt: 2019-09-03T06:07:53Z

hostIP: 192.168.122.91

phase: Running

podIP: 172.17.0.4

qosClass: BestEffort

startTime: 2019-09-03T06:05:16Z

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值