kubectl可操作的资源对象类型

资源名缩写资源类型

nodes

no

Node

pods

po

Pod

daemonsets

ds

DaemonSet

deployments

deploy

Deployment

replicasets

rs

ReplicaSet

statefulsets

sts

StatefulSet

namespaces

ns

Namespace

secrets

NULL

Secret

leases

NULL

Lease

services

svc

Service

cronjobs

cj

CronJob

jobs

NULL

Job

endpoints

ep

Endpoints

events

ev

Event

limitranges

limits

LimitRange

persistentvolumeclaims

pvc

PersistentVolumeClaim

persistentvolumes

pv

PersistentVolume

podtemplates

NULL

PodTemplate

replicationcontrollers

rc

ReplicationController

resourcequotas

quota

ResourceQuota

bindings

Binding

serviceaccounts

sa

ServiceAccount

mutatingwebhookconfigurations

NULL

MutatingWebhookConfiguration

validatingwebhookconfigurations

NULL

ValidatingWebhookConfiguration

customresourcedefinitions

crd,crds

CustomResourceDefinition

apiservices

NULL

APIService

tokenreviews

NULL

TokenReview

localsubjectaccessreviews

NULL

LocalSubjectAccessReview

controllerrevisions

NULL

ControllerRevision

selfsubjectrulesreviews

NULL

SelfSubjectRulesReview

subjectaccessreviews

NULL

SubjectAccessReview

horizontalpodautoscalers

hpa

HorizontalPodAutoscaler

componentstatuses

cs

ComponentStatus

configmaps

cm

ConfigMap

certificatesigningrequests

csr

CertificateSigningRequest

selfsubjectaccessreviews

NULL

SelfSubjectAccessReview

endpointslices

NULL

EndpointSlice

events

ev

Event

flowschemas

NULL

FlowSchema

prioritylevelconfigurations

NULL

PriorityLevelConfiguration

ingressclasses

NULL

IngressClass

ingresses

ing

Ingress

networkpolicies

netpol

NetworkPolicy

runtimeclasses

NULL

RuntimeClass

poddisruptionbudgets

pdb

PodDisruptionBudget

podsecuritypolicies

psp

PodSecurityPolicy

clusterrolebindings

NULL

ClusterRoleBinding

clusterroles

NULL

ClusterRole

rolebindings

NULL

RoleBinding

roles

NULL

Role

priorityclasses

pc

PriorityClass

csidrivers

NULL

CSIDriver

csinodes

NULL

CSINode

csistoragecapacities

NULL

CSIStorageCapacity

storageclasses

sc

StorageClass

volumeattachments

NULL

VolumeAttachment

SQL脚本
-- ----------------------------
-- Table structure for k8s_resource
-- ----------------------------
DROP TABLE IF EXISTS `k8s_resource`;
CREATE TABLE `k8s_resource`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `resource` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `constraction` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `type` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `priority` tinyint(4) NULL DEFAULT NULL,
  `version` varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `depend_ns` varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 57 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of k8s_resource
-- ----------------------------
INSERT INTO `k8s_resource` VALUES (1, 'bindings', '', 'Binding', 0, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (2, 'componentstatuses', 'cs', 'ComponentStatus', 0, 'v1', 'FALSE');
INSERT INTO `k8s_resource` VALUES (3, 'configmaps', 'cm', 'ConfigMap', 0, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (4, 'endpoints', 'ep', 'Endpoints', 0, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (5, 'events', 'ev', 'Event', 0, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (6, 'limitranges', 'limits', 'LimitRange', 0, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (7, 'namespaces', 'ns', 'Namespace', 1, 'v1', 'FALSE');
INSERT INTO `k8s_resource` VALUES (8, 'nodes', 'no', 'Node', 1, 'v1', 'FALSE');
INSERT INTO `k8s_resource` VALUES (9, 'persistentvolumeclaims', 'pvc', 'PersistentVolumeClaim', 0, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (10, 'persistentvolumes', 'pv', 'PersistentVolume', 0, 'v1', 'FALSE');
INSERT INTO `k8s_resource` VALUES (11, 'pods', 'po', 'Pod', 1, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (12, 'podtemplates', NULL, 'PodTemplate', 0, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (13, 'replicationcontrollers', 'rc', 'ReplicationController', 0, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (14, 'resourcequotas', 'quota', 'ResourceQuota', 0, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (15, 'secrets', NULL, 'Secret', 1, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (16, 'serviceaccounts', 'sa', 'ServiceAccount', 0, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (17, 'services', 'svc', 'Service', 1, 'v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (18, 'mutatingwebhookconfigurations', NULL, 'MutatingWebhookConfiguration', 0, 'admissionregistr', 'FALSE');
INSERT INTO `k8s_resource` VALUES (19, 'validatingwebhookconfigurations', NULL, 'ValidatingWebhookConfiguration', 0, 'admissionregistr', 'FALSE');
INSERT INTO `k8s_resource` VALUES (20, 'customresourcedefinitions', 'crd,crds', 'CustomResourceDefinition', 0, 'apiextensions.k8', 'FALSE');
INSERT INTO `k8s_resource` VALUES (21, 'apiservices', NULL, 'APIService', 0, 'apiregistration.', 'FALSE');
INSERT INTO `k8s_resource` VALUES (22, 'controllerrevisions', NULL, 'ControllerRevision', 0, 'apps/v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (23, 'daemonsets', 'ds', 'DaemonSet', 1, 'apps/v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (24, 'deployments', 'deploy', 'Deployment', 1, 'apps/v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (25, 'replicasets', 'rs', 'ReplicaSet', 1, 'apps/v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (26, 'statefulsets', 'sts', 'StatefulSet', 1, 'apps/v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (27, 'tokenreviews', NULL, 'TokenReview', 0, 'authentication.k', 'FALSE');
INSERT INTO `k8s_resource` VALUES (28, 'localsubjectaccessreviews', NULL, 'LocalSubjectAccessReview', 0, 'authorization.k8', 'TRUE');
INSERT INTO `k8s_resource` VALUES (29, 'selfsubjectaccessreviews', NULL, 'SelfSubjectAccessReview', 0, 'authorization.k8', 'FALSE');
INSERT INTO `k8s_resource` VALUES (30, 'selfsubjectrulesreviews', NULL, 'SelfSubjectRulesReview', 0, 'authorization.k8', 'FALSE');
INSERT INTO `k8s_resource` VALUES (31, 'subjectaccessreviews', NULL, 'SubjectAccessReview', 0, 'authorization.k8', 'FALSE');
INSERT INTO `k8s_resource` VALUES (32, 'horizontalpodautoscalers', 'hpa', 'HorizontalPodAutoscaler', 0, 'autoscaling/v2', 'TRUE');
INSERT INTO `k8s_resource` VALUES (33, 'cronjobs', 'cj', 'CronJob', 1, 'batch/v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (34, 'jobs', NULL, 'Job', 1, 'batch/v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (35, 'certificatesigningrequests', 'csr', 'CertificateSigningRequest', 0, 'certificates.k8s', 'FALSE');
INSERT INTO `k8s_resource` VALUES (36, 'leases', NULL, 'Lease', 1, 'coordination.k8s', 'TRUE');
INSERT INTO `k8s_resource` VALUES (37, 'endpointslices', NULL, 'EndpointSlice', 0, 'discovery.k8s.io', 'TRUE');
INSERT INTO `k8s_resource` VALUES (38, 'events', 'ev', 'Event', 0, 'events.k8s.io/v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (39, 'flowschemas', NULL, 'FlowSchema', 0, 'flowcontrol.apis', 'FALSE');
INSERT INTO `k8s_resource` VALUES (40, 'prioritylevelconfigurations', NULL, 'PriorityLevelConfiguration', 0, 'flowcontrol.apis', 'FALSE');
INSERT INTO `k8s_resource` VALUES (41, 'ingressclasses', NULL, 'IngressClass', 0, 'networking.k8s.i', 'FALSE');
INSERT INTO `k8s_resource` VALUES (42, 'ingresses', 'ing', 'Ingress', 0, 'networking.k8s.i', 'TRUE');
INSERT INTO `k8s_resource` VALUES (43, 'networkpolicies', 'netpol', 'NetworkPolicy', 0, 'networking.k8s.i', 'TRUE');
INSERT INTO `k8s_resource` VALUES (44, 'runtimeclasses', NULL, 'RuntimeClass', 0, 'node.k8s.io/v1', 'FALSE');
INSERT INTO `k8s_resource` VALUES (45, 'poddisruptionbudgets', 'pdb', 'PodDisruptionBudget', 0, 'policy/v1', 'TRUE');
INSERT INTO `k8s_resource` VALUES (46, 'podsecuritypolicies', 'psp', 'PodSecurityPolicy', 0, 'policy/v1beta1', 'FALSE');
INSERT INTO `k8s_resource` VALUES (47, 'clusterrolebindings', NULL, 'ClusterRoleBinding', 0, 'rbac.authorizati', 'FALSE');
INSERT INTO `k8s_resource` VALUES (48, 'clusterroles', NULL, 'ClusterRole', 0, 'rbac.authorizati', 'FALSE');
INSERT INTO `k8s_resource` VALUES (49, 'rolebindings', NULL, 'RoleBinding', 0, 'rbac.authorizati', 'TRUE');
INSERT INTO `k8s_resource` VALUES (50, 'roles', NULL, 'Role', 0, 'rbac.authorizati', 'TRUE');
INSERT INTO `k8s_resource` VALUES (51, 'priorityclasses', 'pc', 'PriorityClass', 0, 'scheduling.k8s.i', 'FALSE');
INSERT INTO `k8s_resource` VALUES (52, 'csidrivers', NULL, 'CSIDriver', 0, 'storage.k8s.io/v', 'FALSE');
INSERT INTO `k8s_resource` VALUES (53, 'csinodes', NULL, 'CSINode', 0, 'storage.k8s.io/v', 'FALSE');
INSERT INTO `k8s_resource` VALUES (54, 'csistoragecapacities', NULL, 'CSIStorageCapacity', 0, 'storage.k8s.io/v', 'TRUE');
INSERT INTO `k8s_resource` VALUES (55, 'storageclasses', 'sc', 'StorageClass', 0, 'storage.k8s.io/v', 'FALSE');
INSERT INTO `k8s_resource` VALUES (56, 'volumeattachments', NULL, 'VolumeAttachment', 0, 'storage.k8s.io/v', 'FALSE');

最后更新于