kubectl alpha

简介

这些命令对应于 Kubernetes 集群中默认情况下未启用的 Alpha 级别特性。

选项

-h, --help

alpha 命令的帮助信息。

Parent Options Inherited

--as string

操作所用的伪装用户名。用户可以是常规用户或命名空间中的服务账号。

--as-group strings

操作所用的伪装用户组,此标志可以被重复设置以指定多个组。

--as-uid string

操作所用的伪装 UID。

--as-user-extra strings

用户额外信息,用于伪装操作,此标志可以重复使用,为同一个键指定多个值。

--cache-dir string      默认值:"$HOME/.kube/cache"

默认缓存目录。

--certificate-authority string

证书机构的证书文件的路径。

--client-certificate string

TLS 客户端证书文件的路径。

--client-key string

TLS 客户端密钥文件的路径。

--cluster string

要使用的 kubeconfig 中集群的名称。

--context string

要使用的 kubeconfig 上下文的名称。

--disable-compression

If true, opt-out of response compression for all requests to the server

--insecure-skip-tls-verify

如果为 true,则不检查服务器证书的有效性。这将使你的 HTTPS 连接不安全。

--kubeconfig string

CLI 请求要使用的 kubeconfig 文件的路径。

--kuberc string

用于偏好设置的 kuberc 文件的路径。可以通过导出 KUBECTL_KUBERC=false 特性门控或关闭 KUBERC=off 特性门控来禁用此功能。

--match-server-version

要求服务器版本与客户端版本匹配。

-n, --namespace string

如果存在,则是此 CLI 请求的命名空间范围。

--password string

对 API 服务器进行基本身份验证所用的密码。

--profile string      默认值:"none"

要记录的性能分析信息。可选值为(none|cpu|heap|goroutine|threadcreate|block|mutex)。

--profile-output string      默认值:"profile.pprof"

性能分析信息要写入的目标文件的名称。

--request-timeout string      默认值:"0"

在放弃某个服务器请求之前等待的时长。非零值应包含相应的时间单位(例如 1s、2m、3h)。 值为零表示请求不会超时。

-s, --server string

Kubernetes API 服务器的地址和端口。

--storage-driver-buffer-duration duration      默认值:1m0s

对存储驱动的写入操作将被缓存的时长;缓存的操作会作为一个事务提交给非内存后端。

--storage-driver-db string      默认值:"cadvisor"

数据库名称。

--storage-driver-host string      默认值:"localhost:8086"

数据库 host:port。

--storage-driver-password string      默认值:"root"

数据库密码。

--storage-driver-secure

使用安全连接来连接数据库。

--storage-driver-table string      默认值:"stats"

表名。

--storage-driver-user string      默认值:"root"

数据库用户名。

--tls-server-name string

服务器证书验证所用的服务器名称。如果未提供,则使用与服务器通信所用的主机名。

--token string

向 API 服务器进行身份认证所用的持有者令牌。

--user string

要使用的 kubeconfig 用户的名称。

--username string

对 API 服务器进行基本身份认证时所用的用户名。

--version version[=true]

--version, --version=raw 打印版本信息并退出;--version=vX.Y.Z... 设置报告的版本。

--warnings-as-errors

将从服务器收到的警告视为错误,并以非零退出码退出。

另请参见

该页面是自动生成的。

如果你打算报告此页面的问题,请在问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。

最后修改 December 28, 2025 at 3:39 PM PST: [zh-cn]sync kubectl_alpha/_index.md (0eeb711afc)