簡體   English   中英

Kubernetes 上的 AWS 集成

[英]AWS Integration on Kubernetes

我在 Kubernetes 集群上設置 AWS 集成時遇到問題。 我已經在所有實例、子網、VPC 和單個 SG 上設置了kubernetes.io/cluster/clustername = 擁有的標簽。 我還將--cloud-provider=aws標志傳遞給 API 服務器和控制器管理器,但控制器管理器沒有啟動。

控制器管理器日志:

I0411 21:03:48.360194       1 aws.go:1026] Building AWS cloudprovider
I0411 21:03:48.360237       1 aws.go:988] Zone not specified in configuration file; querying AWS metadata service
F0411 21:03:48.363067       1 controllermanager.go:159] error building controller context: cloud provider could not be initialized: could not init cloud provider "aws": error finding instance i-0442e20b4a28b2274: "error listing AWS instances: \"NoCredentialProviders: no valid providers in chain. Deprecated.\\n\\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors\""

附加到主節點的策略是:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [ "ec2:*" ],
      "Resource": [ "*" ]
    },
    {
      "Effect": "Allow",
      "Action": [ "elasticloadbalancing:*" ],
      "Resource": [ "*" ]
    },
    {
      "Effect": "Allow",
      "Action": [ "route53:*" ],
      "Resource": [ "*" ]
    }
  ]
}

通過 cURL 從 master 查詢 AWS Metadata Service 返回正確的憑證

任何幫助都感激不盡!

PS:我沒有使用 Kops 或任何類似的東西。 我自己設置了控制組件平面。

我能夠通過將--cloud-provider=aws標志傳遞給kubelets來解決這個問題。 我認為在主節點上不需要。

謝謝!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM