1、kubernetes中的资源对象是什么,有什么作用
在 Kubernetes 中,资源对象是集群内的一个个实体,它们代表了集群的状态和行为。这些资源对象通过 Kubernetes 的 API 进行定义和管理,每种资源对象都有特定的作用和用途
- 获取所有的资源
kubectl api-resources
NAME SHORTNAMES APIVERSION NAMESPACED KIND
bindings v1 true Binding
componentstatuses cs v1 false ComponentStatus
configmaps cm v1 true ConfigMap
endpoints ep v1 true Endpoints
events ev v1 true Event
limitranges limits v1 true LimitRange
namespaces ns v1 false Namespace
nodes no v1 false Node
persistentvolumeclaims pvc v1 true PersistentVolumeClaim
persistentvolumes pv v1 false PersistentVolume
pods po v1 true Pod
podtemplates v1 true PodTemplate
replicationcontrollers rc v1 true ReplicationController
resourcequotas quota v1 true ResourceQuota
secrets v1 true Secret
serviceaccounts sa v1 true ServiceAccount
services svc v1 true Service
mutatingwebhookconfigurations admissionregistration.k8s.io/v1 false MutatingWebhookConfiguration
validatingwebhookconfigurations admissionregistration.k8s.io/v1 false ValidatingWebhookConfiguration
ackalertrules alertrule alert.alibabacloud.com/v1beta1 true AckAlertRule
resourceflavors flavor,flavors alibabacloud.com/v1beta2 false ResourceFlavor
customresourcedefinitions crd,crds apiextensions.k8s.io/v1 false CustomResourceDefinition
apiservices apiregistration.k8s.io/v1 false APIService
controllerrevisions apps/v1 true ControllerRevision
daemonsets ds apps/v1 true DaemonSet
deployments deploy apps/v1 true Deployment
replicasets rs apps/v1 true ReplicaSet
statefulsets sts apps/v1 true StatefulSet
selfsubjectreviews authentication.k8s.io/v1 false SelfSubjectReview
tokenreviews authentication.k8s.io/v1 false TokenReview
localsubjectaccessreviews authorization.k8s.io/v1 true LocalSubjectAccessReview
selfsubjectaccessreviews authorization.k8s.io/v1 false SelfSubjectAccessReview
selfsubjectrulesreviews authorization.k8s.io/v1 false SelfSubjectRulesReview
subjectaccessreviews authorization.k8s.io/v1 false SubjectAccessReview
horizontalpodautoscalers hpa autoscaling/v2 true HorizontalPodAutoscaler
cronjobs cj batch/v1 true CronJob
jobs batch/v1 true Job
apps catalog.cattle.io/v1 true App
clusterrepos catalog.cattle.io/v1 false ClusterRepo
operations catalog.cattle.io/v1 true Operation
certificatesigningrequests csr certificates.k8s.io/v1 false CertificateSigningRequest
clusters cl cluster.x-k8s.io/v1beta1 true Cluster
machinedeployments md cluster.x-k8s.io/v1beta1 true MachineDeployment
machinehealthchecks mhc,mhcs cluster.x-k8s.io/v1beta1 true MachineHealthCheck
machines ma cluster.x-k8s.io/v1beta1 true Machine
machinesets ms cluster.x-k8s.io/v1beta1 true MachineSet
leases coordination.k8s.io/v1 true Lease
bgpconfigurations crd.projectcalico.org/v1 false BGPConfiguration
clusterinformations crd.projectcalico.org/v1 false ClusterInformation
felixconfigurations crd.projectcalico.org/v1 false FelixConfiguration
globalnetworkpolicies crd.projectcalico.org/v1 false GlobalNetworkPolicy
globalnetworksets crd.projectcalico.org/v1 false GlobalNetworkSet
hostendpoints crd.projectcalico.org/v1 false HostEndpoint
ippools crd.projectcalico.org/v1 false IPPool
networkpolicies crd.projectcalico.org/v1 true NetworkPolicy
endpointslices discovery.k8s.io/v1 true EndpointSlice
events ev events.k8s.io/v1 true Event
bundledeployments fleet.cattle.io/v1alpha1 true BundleDeployment
bundlenamespacemappings fleet.cattle.io/v1alpha1 true BundleNamespaceMapping
bundles fleet.cattle.io/v1alpha1 true Bundle
clustergroups fleet.cattle.io/v1alpha1 true ClusterGroup
clusterregistrations fleet.cattle.io/v1alpha1 true ClusterRegistration
clusterregistrationtokens fleet.cattle.io/v1alpha1 true ClusterRegistrationToken
clusters fleet.cattle.io/v1alpha1 true Cluster
contents fleet.cattle.io/v1alpha1 false Content
gitreporestrictions fleet.cattle.io/v1alpha1 true GitRepoRestriction
gitrepos fleet.cattle.io/v1alpha1 true GitRepo
imagescans fleet.cattle.io/v1alpha1 true ImageScan
flowschemas flowcontrol.apiserver.k8s.io/v1beta3 false FlowSchema
prioritylevelconfigurations flowcontrol.apiserver.k8s.io/v1beta3 false PriorityLevelConfiguration
gatewayclasses gc gateway.networking.k8s.io/v1beta1 false GatewayClass
gateways gtw gateway.networking.k8s.io/v1beta1 true Gateway
httproutes gateway.networking.k8s.io/v1beta1 true HTTPRoute
referencegrants refgrant gateway.networking.k8s.io/v1beta1 true ReferenceGrant
gitjobs gitjob.cattle.io/v1 true GitJob
aliyunlogconfigs log.alibabacloud.com/v1alpha1 true AliyunLogConfig
apiservices management.cattle.io/v3 false APIService
authconfigs management.cattle.io/v3 false AuthConfig
catalogs management.cattle.io/v3 false Catalog
catalogtemplates management.cattle.io/v3 true CatalogTemplate
catalogtemplateversions management.cattle.io/v3 true CatalogTemplateVersion
clusteralertgroups management.cattle.io/v3 true ClusterAlertGroup
clusteralertrules management.cattle.io/v3 true ClusterAlertRule
clusteralerts management.cattle.io/v3 true ClusterAlert
clustercatalogs management.cattle.io/v3 true ClusterCatalog
clustermonitorgraphs management.cattle.io/v3 true ClusterMonitorGraph
clusterregistrationtokens management.cattle.io/v3 true ClusterRegistrationToken
clusterroletemplatebindings management.cattle.io/v3 true ClusterRoleTemplateBinding
clusters management.cattle.io/v3 false Cluster
clustertemplaterevisions management.cattle.io/v3 true ClusterTemplateRevision
clustertemplates management.cattle.io/v3 true ClusterTemplate
composeconfigs management.cattle.io/v3 false ComposeConfig
dynamicschemas management.cattle.io/v3 false DynamicSchema
etcdbackups management.cattle.io/v3 true EtcdBackup
features management.cattle.io/v3 false Feature
fleetworkspaces management.cattle.io/v3 false FleetWorkspace
globaldnses management.cattle.io/v3 true GlobalDns
globaldnsproviders management.cattle.io/v3 true GlobalDnsProvider
globalrolebindings management.cattle.io/v3 false GlobalRoleBinding
globalroles management.cattle.io/v3 false GlobalRole
groupmembers management.cattle.io/v3 false GroupMember
groups management.cattle.io/v3 false Group
kontainerdrivers management.cattle.io/v3 false KontainerDriver
managedcharts management.cattle.io/v3 true ManagedChart
monitormetrics management.cattle.io/v3 true MonitorMetric
multiclusterapprevisions management.cattle.io/v3 true MultiClusterAppRevision
multiclusterapps management.cattle.io/v3 true MultiClusterApp
nodedrivers management.cattle.io/v3 false NodeDriver
nodepools management.cattle.io/v3 true NodePool
nodes management.cattle.io/v3 true Node
nodetemplates management.cattle.io/v3 true NodeTemplate
notifiers management.cattle.io/v3 true Notifier
podsecurityadmissionconfigurationtemplates management.cattle.io/v3 false PodSecurityAdmissionConfigurationTemplate
podsecuritypolicytemplateprojectbindings management.cattle.io/v3 true PodSecurityPolicyTemplateProjectBinding
podsecuritypolicytemplates management.cattle.io/v3 false PodSecurityPolicyTemplate
preferences management.cattle.io/v3 true Preference
projectalertgroups management.cattle.io/v3 true ProjectAlertGroup
projectalertrules management.cattle.io/v3 true ProjectAlertRule
projectalerts management.cattle.io/v3 true ProjectAlert
projectcatalogs management.cattle.io/v3 true ProjectCatalog
projectmonitorgraphs management.cattle.io/v3 true ProjectMonitorGraph
projectnetworkpolicies management.cattle.io/v3 true ProjectNetworkPolicy
projectroletemplatebindings management.cattle.io/v3 true ProjectRoleTemplateBinding
projects management.cattle.io/v3 true Project
rancherusernotifications management.cattle.io/v3 false RancherUserNotification
rkeaddons management.cattle.io/v3 true RkeAddon
rkek8sserviceoptions management.cattle.io/v3 true RkeK8sServiceOption
rkek8ssystemimages management.cattle.io/v3 true RkeK8sSystemImage
roletemplates management.cattle.io/v3 false RoleTemplate
samltokens management.cattle.io/v3 true SamlToken
settings management.cattle.io/v3 false Setting
templatecontents management.cattle.io/v3 false TemplateContent
templates management.cattle.io/v3 false Template
templateversions management.cattle.io/v3 false TemplateVersion
tokens management.cattle.io/v3 false Token
userattributes management.cattle.io/v3 false UserAttribute
users management.cattle.io/v3 false User
nodes metrics.k8s.io/v1beta1 false NodeMetrics
pods metrics.k8s.io/v1beta1 true PodMetrics
alertmanagerconfigs amcfg monitoring.coreos.com/v1alpha1 true AlertmanagerConfig
alertmanagers am monitoring.coreos.com/v1 true Alertmanager
podmonitors pmon monitoring.coreos.com/v1 true PodMonitor
probes prb monitoring.coreos.com/v1 true Probe
prometheusagents promagent monitoring.coreos.com/v1alpha1 true PrometheusAgent
prometheuses prom monitoring.coreos.com/v1 true Prometheus
prometheusrules promrule monitoring.coreos.com/v1 true PrometheusRule
scrapeconfigs scfg monitoring.coreos.com/v1alpha1 true ScrapeConfig
servicemonitors smon monitoring.coreos.com/v1 true ServiceMonitor
thanosrulers ruler monitoring.coreos.com/v1 true ThanosRuler
ingressclasses networking.k8s.io/v1 false IngressClass
ingresses ing networking.k8s.io/v1 true Ingress
networkpolicies netpol networking.k8s.io/v1 true NetworkPolicy
runtimeclasses node.k8s.io/v1 false RuntimeClass
poddisruptionbudgets pdb policy/v1 true PodDisruptionBudget
apprevisions project.cattle.io/v3 true AppRevision
apps project.cattle.io/v3 true App
clusters provisioning.cattle.io/v1 true Cluster
clusterrolebindings rbac.authorization.k8s.io/v1 false ClusterRoleBinding
clusterroles rbac.authorization.k8s.io/v1 false ClusterRole
rolebindings rbac.authorization.k8s.io/v1 true RoleBinding
roles rbac.authorization.k8s.io/v1 true Role
amazonec2configs rke-machine-config.cattle.io/v1 true Amazonec2Config
azureconfigs rke-machine-config.cattle.io/v1 true AzureConfig
digitaloceanconfigs rke-machine-config.cattle.io/v1 true DigitaloceanConfig
harvesterconfigs rke-machine-config.cattle.io/v1 true HarvesterConfig
linodeconfigs rke-machine-config.cattle.io/v1 true LinodeConfig
vmwarevsphereconfigs rke-machine-config.cattle.io/v1 true VmwarevsphereConfig
amazonec2machines rke-machine.cattle.io/v1 true Amazonec2Machine
amazonec2machinetemplates rke-machine.cattle.io/v1 true Amazonec2MachineTemplate
azuremachines rke-machine.cattle.io/v1 true AzureMachine
azuremachinetemplates rke-machine.cattle.io/v1 true AzureMachineTemplate
digitaloceanmachines rke-machine.cattle.io/v1 true DigitaloceanMachine
digitaloceanmachinetemplates rke-machine.cattle.io/v1 true DigitaloceanMachineTemplate
harvestermachines rke-machine.cattle.io/v1 true HarvesterMachine
harvestermachinetemplates rke-machine.cattle.io/v1 true HarvesterMachineTemplate
linodemachines rke-machine.cattle.io/v1 true LinodeMachine
linodemachinetemplates rke-machine.cattle.io/v1 true LinodeMachineTemplate
vmwarevspheremachines rke-machine.cattle.io/v1 true VmwarevsphereMachine
vmwarevspheremachinetemplates rke-machine.cattle.io/v1 true VmwarevsphereMachineTemplate
custommachines rke.cattle.io/v1 true CustomMachine
etcdsnapshots rke.cattle.io/v1 true ETCDSnapshot
rkebootstraps rke.cattle.io/v1 true RKEBootstrap
rkebootstraptemplates rke.cattle.io/v1 true RKEBootstrapTemplate
rkeclusters rke.cattle.io/v1 true RKECluster
rkecontrolplanes rke.cattle.io/v1 true RKEControlPlane
resourcepolicies scheduling.alibabacloud.com/v1alpha1 true ResourcePolicy
priorityclasses pc scheduling.k8s.io/v1 false PriorityClass
clusternetworktopologies scheduling.koordinator.sh/v1alpha1 false ClusterNetworkTopology
jobnetworktopologies scheduling.koordinator.sh/v1alpha1 true JobNetworkTopology
reservations scheduling.koordinator.sh/v1alpha1 false Reservation
elasticquotas eq,eqs scheduling.sigs.k8s.io/v1alpha1 true ElasticQuota
elasticquotatrees eqtree,eqtrees scheduling.sigs.k8s.io/v1beta1 true ElasticQuotaTree
podgroups pg,pgs scheduling.sigs.k8s.io/v1alpha1 true PodGroup
benchmarkcsvresults securityinspector.alibabacloud.com/v1alpha1 false BenchmarkCSVResult
benchmarkjobs securityinspector.alibabacloud.com/v1alpha1 false BenchmarkJob
benchmarkrawresults securityinspector.alibabacloud.com/v1alpha1 false BenchmarkRawResult
benchmarkreports securityinspector.alibabacloud.com/v1alpha1 false BenchmarkReport
benchmarksummaries securityinspector.alibabacloud.com/v1alpha1 false BenchmarkSummary
benchmarktasks securityinspector.alibabacloud.com/v1alpha1 false BenchmarkTask
benchmarkwhitelists securityinspector.alibabacloud.com/v1alpha1 false BenchmarkWhitelist
clustercvefixjobs securityinspector.alibabacloud.com/v1alpha1 false ClusterCVEFixJob
clustercvereports securityinspector.alibabacloud.com/v1alpha1 false ClusterCVEReport
configauditclustersummaries securityinspector.alibabacloud.com/v1alpha1 false ConfigAuditClusterSummary
configauditreports securityinspector.alibabacloud.com/v1alpha1 true ConfigAuditReport
configauditwhitelists securityinspector.alibabacloud.com/v1alpha1 true ConfigAuditWhitelist
nodemetrics slo.koordinator.sh/v1alpha1 false NodeMetric
volumesnapshotclasses snapshot.storage.k8s.io/v1 false VolumeSnapshotClass
volumesnapshotcontents snapshot.storage.k8s.io/v1 false VolumeSnapshotContent
volumesnapshots snapshot.storage.k8s.io/v1 true VolumeSnapshot
containernetworkfilesystems cnfs storage.alibabacloud.com/v1beta1 false ContainerNetworkFileSystem
containerstorageoperators cso storage.alibabacloud.com/v1beta1 false ContainerStorageOperator
storageautoscalerpolicies sasp storage.alibabacloud.com/v1alpha1 false StorageAutoScalerPolicy
csidrivers storage.k8s.io/v1 false CSIDriver
csinodes storage.k8s.io/v1 false CSINode
csistoragecapacities storage.k8s.io/v1 true CSIStorageCapacity
storageclasses sc storage.k8s.io/v1 false StorageClass
volumeattachments storage.k8s.io/v1 false VolumeAttachment
noderesourcetopologies node-res-topo topology.node.k8s.io/v1alpha1 false NodeResourceTopology
ingressroutes traefik.containo.us/v1alpha1 true IngressRoute
ingressroutetcps traefik.containo.us/v1alpha1 true IngressRouteTCP
ingressrouteudps traefik.containo.us/v1alpha1 true IngressRouteUDP
middlewares traefik.containo.us/v1alpha1 true Middleware
middlewaretcps traefik.containo.us/v1alpha1 true MiddlewareTCP
serverstransports traefik.containo.us/v1alpha1 true ServersTransport
tlsoptions traefik.containo.us/v1alpha1 true TLSOption
tlsstores traefik.containo.us/v1alpha1 true TLSStore
traefikservices traefik.containo.us/v1alpha1 true TraefikService
ingressroutes traefik.io/v1alpha1 true IngressRoute
ingressroutetcps traefik.io/v1alpha1 true IngressRouteTCP
ingressrouteudps traefik.io/v1alpha1 true IngressRouteUDP
middlewares traefik.io/v1alpha1 true Middleware
middlewaretcps traefik.io/v1alpha1 true MiddlewareTCP
serverstransports traefik.io/v1alpha1 true ServersTransport
serverstransporttcps traefik.io/v1alpha1 true ServersTransportTCP
tlsoptions traefik.io/v1alpha1 true TLSOption
tlsstores traefik.io/v1alpha1 true TLSStore
traefikservices traefik.io/v1alpha1 true TraefikServic
2、kubernetes中的资源对象有哪些
将 Kubernetes 的核心资源按照功能进行划分,可以帮助理解它们在集群中的作用和相互关系。以下是一个常见的划分方式:
标签:false,kubernetes,D12,对象,v1,v3,io,cattle,true
From: https://www.cnblogs.com/suyj/p/18395198