标签:toc qos uid for odi 无限 xpl exec 维护
~]# kubectl get pod nginx-deploy-bc9ff65dd-m8k46 -o yaml
apiVersion: v1 #对象属于哪个组,此对象属于核心组,core/v1
kind: Pod #具体资源对象
metadata: #元数据
creationTimestamp: "2019-06-24T13:33:09Z"
generateName: nginx-deploy-bc9ff65dd-
labels:
pod-template-hash: bc9ff65dd
run: nginx-deploy
name: nginx-deploy-bc9ff65dd-m8k46
namespace: default
ownerReferences:
- apiVersion: apps/v1
blockOwnerDeletion: true
controller: true
kind: ReplicaSet
name: nginx-deploy-bc9ff65dd
uid: 0e2bf48a-822f-4a05-8779-fa97998f0eb3
resourceVersion: "86123"
selfLink: /api/v1/namespaces/default/pods/nginx-deploy-bc9ff65dd-m8k46
uid: 817f0411-67c6-43db-aef0-54ac0465bc94
spec: #规格,定义资源对象的特性或规范,也叫期望状态
containers:
- image: nginx:1.14
imagePullPolicy: IfNotPresent
name: nginx-deploy
ports:
- containerPort: 80
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: default-token-4q4c9
readOnly: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
nodeName: node01
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-4q4c9
secret:
defaultMode: 420
secretName: default-token-4q4c9
status: #显示资源当前状态,当前状态无限向期望状态靠近
conditions:
- lastProbeTime: null
lastTransitionTime: "2019-06-24T13:33:09Z"
status: "True"
type: Initialized
- lastProbeTime: null
lastTransitionTime: "2019-06-24T13:40:27Z"
status: "True"
type: Ready
- lastProbeTime: null
lastTransitionTime: "2019-06-24T13:40:27Z"
status: "True"
type: ContainersReady
- lastProbeTime: null
lastTransitionTime: "2019-06-24T13:33:09Z"
status: "True"
type: PodScheduled
containerStatuses:
- containerID: docker://fa614bd334c9985121436b1ef3bf3c2cab6ca77e8e2a8171ad37172872f6147b
image: nginx:1.14
imageID: docker-pullable://nginx@sha256:f7988fb6c02e0ce69257d9bd9cf37ae20a60f1df7563c3a2a6abe24160306b8d
lastState: {}
name: nginx-deploy
ready: true
restartCount: 0
state:
running:
startedAt: "2019-06-24T13:40:26Z"
hostIP: 192.168.100.61
phase: Running
podIP: 10.244.1.2
qosClass: BestEffort
startTime: "2019-06-24T13:33:09Z"
/api/GROUP/VERSION/namespaces/NAMESPACE/TYPE/NAME
~]# kubectl explain pods
~]# kubectl api-versions #显示所有支持的api版本
name:资源名称
namespace:kubernetes级别的名称空间
labels:标签
annotaions:注解
apiVersion: v1
kind: Pod
metadata:
name: pod-demo
namespace: default
labels:
app: myapp
tier: frontend #层次:前端
spec:
containers:
- name: myapp
image: dongfeimg/myapp:v1
# kubectl create -f pod-demo.yaml
# kubectl describe pods pod-demo #查看详细信息
# kubectl delete -f pod-demo.yaml
标签:toc qos uid for odi 无限 xpl exec 维护
原文地址:https://www.cnblogs.com/L-dongf/p/11087359.html