delete 通过配置文件名、stdin、资源名称或label选择器来删除资源。# 语法$ delete([-f FILENAME]|TYPE...
kubectl 语法格式如下,可在 k8s 集群的 master 节点执行:kubectl [command] [TYPE] [NAME] [flags] 2.上述语法解释说明 command:指定要对一个或多个资源执行的操作,例如 create、get、describe、delete等。 type:指定资源类型,可以是 pod、deployment、statefulset、service 等。资源类型不区分大小写,可以指定单数、...
kubectl [command] [TYPE] [NAME] [flags]command:对资源执行相应操作的子命令,如get、create、delete、run、describe等 TYPE:要操作的资源对象的类型,如pods、services等,类型名称区分大小写,但支持使用简写格式 NAME:对象名称,区分字符大小写;省略时,则表示指定TYPE的所有资源对象 flags:命令行选项,-o 用于指定输...
kubectl [command] [TYPE] [NAME] [flags] 上述语法解释说明: command:指定要对一个或多个资源执行的操作,例如create、get、describe、delete等。 type:指定资源类型。资源类型不区分大小写,可以指定单数、复数或缩写形式。例如,以下命令输出相同的结果: 代码语言:javascript 代码运行次数:0 复制Cloud Studio 代码运行...
kubectl [command] [TYPE] [NAME] [flags] 其中,command、TYPE、NAME、flags的含义如下。 command:子命令,用于操作资源对象,例如create、get、describe、delete等。 TYPE:资源对象的类型,区分大小写,能以单数、复数或者简写形式表示 NAME:资源对象的名称,区分大小写。如果不指定名称,系统则将返回属于TYPE的全部对象的...
command : 对资源执行的操作,比如 create,get,describe,edit,delete,scale,logs resource_type : 操作的资源类型,单数、复数、缩写形式均可,常用的有 pod,deployment,services(svc),cronjob,job,replicaset(rs),replicationcontrollers(rc),configmaps(cm),secret,namespaces(ns),node ...
delete Delete resources by filenames, stdin, resources and names, or by resources and label selector Deploy Commands: rollout Manage the rollout of a resource scale Set a new size for a Deployment, ReplicaSet or Replication Controller
kubectl delete <resource_type> <resource_name>: 删除指定的资源。 Pod 相关命令: kubectl get pods: 列出所有 Pod。 kubectl describe pod <pod_name>: 显示 Pod 的详细信息。 kubectl logs <pod_name>: 查看 Pod 的日志。 kubectl exec -it <pod_name> -- <command>: 在 Pod 内部执行命令。
$ kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [--command] -- [COMMAND] [args...] 示例: 启动nginx实例。 kubectl run nginx --image=nginx kubectl run nginx --image=nginx --restart=Never -n ...
delete # Delete resources by filenames, stdin, resources and names, or by resources and label selectorDeploy Commands: rollout # Manage the rollout of a resource scale #为 Deployment, ReplicaSet, Replication Controller 或者 Job 设置一个新的副本数量 autoscale # 自动调整一个 Deployment, ReplicaSe...