如何将 Backstage 连接到 Kubernetes 集群以发现 pod

问题描述 投票:0回答:1

我正在尝试将 Backstage 连接到部署在 EKS 上的 Kubernetes 集群,以便发现 pod 并将它们显示在各自组件的页面上。要连接到集群,Backstage 需要一个“集群 URL”。在哪里可以找到集群 URL 和端口?在本地运行时我应该能够连接到这个集群吗?

我在我的机器上本地运行 Backstage 并尝试连接到已部署的 EKS 集群。这是我

app-config.yaml
中的配置:

kubernetes:
  serviceLocatorMethod:
    type: 'multiTenant'
  clusterLocatorMethods:
    - type: 'config'
      clusters:
        - url: http://111.11.1.1:1111
          name: my-cluster-eks
          authProvider: 'aws'
          skipTLSVerify: true
          skipMetricsLookup: true

auth:
  environment: 'development'
  providers:
    aws:
      development:
        accessKeyId: ${AWS_ACCESS_KEY_ID}
        secretAccessKey: ${AWS_SECRET_ACCESS_KEY}
kubernetes amazon-eks backstage
1个回答
0
投票

您可以为您的集群运行命令

kubectl cluster-info

看起来像这样:

kubectl cluster-info 

Kubernetes control plane is running at https://some-ip
GLBCDefaultBackend is running at https://some-ip1/api/v1/namespaces/kube-system/services/default-http-backend:http/proxy
KubeDNS is running at https://some-ip/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
KubeDNSUpstream is running at https://some-ip/api/v1/namespaces/kube-system/services/kube-dns-upstream:dns/proxy
Metrics-server is running at https://some-ip/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy

复制你的 Kubernetes 控制平面 IP

https://some-ip
到你的 app-config.yaml 它应该可以工作

© www.soinside.com 2019 - 2024. All rights reserved.