跳至内容

Kops 提升密钥对

kops promote keypair

提升密钥对成为主密钥对,用于签名。

概要

提升密钥对成为主密钥对,用于签名。

如果未提供密钥对 ID,则如果最近添加的密钥对具有私钥且是在当前主密钥对之后添加的,则该密钥对将被提升。

如果密钥集被指定为 "all",则每个可旋转密钥集将提升其最近添加的密钥对(具有私钥且是在当前主密钥对之后添加的)。

kops promote keypair {KEYSET [ID] | all} [flags]

示例

  # Promote the newest kubernetes-ca keypair to be the primary.
  kops promote keypair kubernetes-ca \
  --name k8s-cluster.example.com --state s3://my-state-store

  # Promote a specific service-account keypair to be the primary.
  kops promote keypair service-account 5938372002934847 \
  --name k8s-cluster.example.com --state s3://my-state-store

  # Promote the newest keypair (having a private key) in each rotatable keyset.
  kops promote keypair all \
  --name k8s-cluster.example.com --state s3://my-state-store

选项

  -h, --help   help for keypair

从父命令继承的选项

      --config string   yaml config file (default is $HOME/.kops.yaml)
      --name string     Name of cluster. Overrides KOPS_CLUSTER_NAME environment variable
      --state string    Location of state storage (kops 'config' file). Overrides KOPS_STATE_STORE environment variable
  -v, --v Level         number for the log level verbosity

另请参阅