gpt4 book ai didi

kubernetes - 如何将Kubernetes集群添加到Spinnaker

转载 作者:行者123 更新时间:2023-12-02 12:30:56 30 4
gpt4 key购买 nike

我正在使用大三角帆 Helm 图表在我的kubernetes集群中部署大三角帆。

https://github.com/helm/charts/tree/master/stable/spinnaker

使用以下步骤,我们可以将k8s集群添加到大三角帆。

  • 将kubeconfig上传到 secret
  • $ kubectl create secret generic --from-file=$HOME/.kube/config my-kubeconfig
  • 设置图表的以下值:
  • kubeConfig:
    enabled: true
    secretName: my-kubeconfig
    secretKey: config
    contexts:
    # Names of contexts available in the uploaded kubeconfig
    - my-context
    # This is the context from the list above that you would like
    # to deploy Spinnaker itself to.
    deploymentContext: my-context

    我想包括Dev,Test,QA k8s集群。我只能包括Dev。让我知道如何包含多个群集。

    最佳答案

    您需要确保所有上下文都在$HOME/.kube/config文件中:

    contexts:
    - context:
    cluster: dev
    user: dev
    name: dev
    - context:
    cluster: test
    user: test
    name: test
    - context:
    cluster: qa
    user: qa
    name: qa


    并且您需要在部署之前在 values.yaml文件上附加所有上下文:
    kubeConfig:
    enabled: true
    secretName: my-kubeconfig
    secretKey: config
    contexts:
    # Names of contexts available in the uploaded kubeconfig
    - dev
    test
    qa
    deploymentContext: dev

    关于kubernetes - 如何将Kubernetes集群添加到Spinnaker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59034468/

    30 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com