k8s POD使用总结
Pod总结
常用资源
- Workload Resources
- Pod
- PodTemplate
- ReplicationController
- ReplicaSet
- Deployment
- StatefulSet
- ControllerRevision
- DaemonSet
- Job
- CronJob
- HorizontalPodAutoscaler
- HorizontalPodAutoscaler v2beta2
- PriorityClass
- Service Resources
- Service
- Endpoints
- EndpointSlice
- Ingress
- IngressClass
- Config and Storage Resources
- ConfigMap
- Secret
- Volume
- PersistentVolumeClaim
- PersistentVolume
- StorageClass
- VolumeAttachment
- CSIDriver
- CSINode
- CSIStorageCapacity
- Authentication Resources
- ServiceAccount
- TokenRequest
- TokenReview
- CertificateSigningRequest
- Authorization Resources
- LocalSubjectAccessReview
- SelfSubjectAccessReview
- SelfSubjectRulesReview
- SubjectAccessReview
- ClusterRole
- ClusterRoleBinding
- Role
- RoleBinding
- Policy Resources
- LimitRange
- ResourceQuota
- NetworkPolicy
- PodDisruptionBudget
- Extend Resources
- CustomResourceDefinition
- MutatingWebhookConfiguration
- ValidatingWebhookConfiguration
- Cluster Resources
- Node
- Namespace
- Event
- APIService
- Lease
- RuntimeClass
- FlowSchema v1beta2
- PriorityLevelConfiguration v1beta2
- Binding
- ComponentStatus
- ClusterCIDR v1alpha1
- Common Definitions
- DeleteOptions
- LabelSelector
- ListMeta
- LocalObjectReference
- NodeSelectorRequirement
- ObjectFieldSelector
- ObjectMeta
- ObjectReference
- Patch
- Quantity
- ResourceFieldSelector
- Status
- TypedLocalObjectReference
describe
kubectl describe pod xxx
结果:
|
|
Pod定义
K8S 的一些 API
fabric8 POD api
- status
- meta
- label,namespace,annotation
- spec
- Priority,Affinity,DNS,Tolerations
- HostAliases,Volumes,PodSecurity
- PodReadinessGate,ServiceAccount
- Container
- command
- env,EnvFromSource
- volumn
- resource-quota,Lifecycle
- image,image 拉取策略,container name
- init container
- 跟 container 参数类似
Volumes
- EmptyDir
- NFS
- csi
- ceph,aws,gcp 等等 持久卷
几个 quota
- priority class
- resouce quota
- pod,关联namespace,优先级
operator 特点
- 可以做有状态管理
- 自动监控状态,括、缩容,状态恢复
- 根据根据定义,实现对状态的管理
Fabric8 API
- 也可以编程的方式实现 operator 类似的功能
- 完整控制了 pod 的全方面和生命周期
- 可以 CURD pod,生命周期管理,状态监控,日志管理
- 有这套 API,可以做非常多的事情