【问题标题】:Create PersistentVolumeClaim imperative way?创建 PersistentVolumeClaim 势在必行的方式?
【发布时间】:2021-06-10 12:06:47
【问题描述】:

为什么我们不能以命令式的方式创建 PV 或 PVC?

尝试使用 create 命令,但没有显示任何命令。

kubectl create --help

Available Commands:
  clusterrole         Create a ClusterRole.
  clusterrolebinding  Create a ClusterRoleBinding for a particular ClusterRole
  configmap           Create a configmap from a local file, directory or literal value
  cronjob             Create a cronjob with the specified name.
  deployment          Create a deployment with the specified name.
  ingress             Create an ingress with the specified name.
  job                 Create a job with the specified name.
  namespace           Create a namespace with the specified name
  poddisruptionbudget Create a pod disruption budget with the specified name.
  priorityclass       Create a priorityclass with the specified name.
  quota               Create a quota with the specified name.
  role                Create a role with single rule.
  rolebinding         Create a RoleBinding for a particular Role or ClusterRole
  secret              Create a secret using specified subcommand
  service             Create a service using specified subcommand.
  serviceaccount      Create a service account with the specified name
   

【问题讨论】:

    标签: kubernetes kubectl persistent-volumes kubernetes-pvc persistent-volume-claims


    【解决方案1】:

    documentation 中所述,kubectl 使用命令式命令内置于 kubectl 命令行工具,以帮助您快速创建对象。

    经过一些检查,这似乎不可用,因为它尚未实施。您可以在 kubectl/pkg/cmd/create 中查看创建选项的完整列表。 例如,#78153 负责 kubectl create ingress 功能。

    通过询问开发人员并打开new issue,您可能会获得更多信息以及未实施此功能的原因。

    【讨论】:

    • 提出了增强请求种类/功能 #1073
    猜你喜欢
    • 2020-01-12
    • 2019-04-27
    • 2020-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多