3. Kubernetes资源-概述
生活随笔
收集整理的這篇文章主要介紹了
3. Kubernetes资源-概述
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
3. Kubernetes資源-概述
3.1 資源概念
Kubernetes中所有內容都抽象為資源,資源實例化之后叫做對象。Kubernetes的資源根據不同的維度可以分為:
- 工作負載型:Pod、ReplicaSet、Deployment、DaemonSet、Job/CronJob、StatefulSet
- 服務發現型:Service、Ingress
- 配置與存儲:ConfigMap、Secret、Volume、PV-PVC
- 集群級別:Namespace、Role、ClusterRole、RoleBinding、ClusterRoleBinding
- 元數據型:HPA、PodTemplate、LimitRangs
3.2 資源清單
Kubernetes中一般使用YAML格式的文件來創建符合預期期望的Pod,這樣的YAML文件稱為資源清單。可以使用kubectl explain RESOURCE [options]查看不同資源支持的YAML標簽。例如:查看Pod資源所支持的標簽
[root@k8smaster43-11 CSDN]# kubectl explain pod KIND: Pod VERSION: v1DESCRIPTION:Pod is a collection of containers that can run on a host. This resource iscreated by clients and scheduled onto hosts.FIELDS:apiVersion <string>APIVersion defines the versioned schema of this representation of anobject. Servers should convert recognized schemas to the latest internalvalue, and may reject unrecognized values. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resourceskind <string>Kind is a string value representing the REST resource this objectrepresents. Servers may infer this from the endpoint the client submitsrequests to. Cannot be updated. In CamelCase. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kindsmetadata <Object>Standard object's metadata. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataspec <Object>Specification of the desired behavior of the pod. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusstatus <Object>Most recently observed status of the pod. This data may not be up to date.Populated by the system. Read-only. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status[root@k8smaster43-11 CSDN]#3.2.1 YAML
3.2.2 創建資源(自主式Pod為例)
總結
以上是生活随笔為你收集整理的3. Kubernetes资源-概述的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 金地集团三季报:归母净利润同比降超三成,
- 下一篇: element ui 表格头部内容不换行