fargate的aws eks -kube -system Pods不安排在Fargate节点上

发布于 2025-02-04 15:40:00 字数 1244 浏览 3 评论 0原文

我在带有Fargate概况的AWS EKS中有一个Kubernetes群集。当我尝试在Kube-System名称空间中运行AWS负载平衡器控制器或Metrics Server时,POD并未在Fargate节点上安排,而是由默认的SCHEDULER选择。但是我尝试通过Fargate-Scheduler选择的默认名称空间部署它们,正在将其部署在Fargate节点上。

这是我用于Kube-System Fargate配置文件的CF模板:

EKSFargateProfileKubeSystem:
    Type: 'AWS::EKS::FargateProfile'
    DependsOn:
      - EKSCluster
      - EKSIAMFargateRole
    Properties:
      FargateProfileName: kube-system
      ClusterName: !Sub 'my-cluster-${Stage}'
      PodExecutionRoleArn:
        "Fn::GetAtt": [ "EKSIAMFargateRole", "Arn" ]
      Subnets:
        - !Ref PrivateSubnet01
        - !Ref PrivateSubnet02
      Selectors:
        - Namespace: kube-system
          Labels:
            - Key: k8s-app
              Value: kube-dns

请建议我是否缺少任何东西,以及为什么Kube-System的Fargate个人资料不起作用。

”在此处输入图像说明”

I have a kubernetes cluster in aws eks with fargate profiles. When I'm trying to run aws load balancer controller or the metrics server in the kube-system namespace, the pods are not getting scheduled on the fargate nodes and are picked by the default-scheduler. But I try to deploy them on the default namespace they are picked by the fargate-scheduler are are getting deployed on the fargate nodes.

Here is my CF template for kube-system fargate profile:

EKSFargateProfileKubeSystem:
    Type: 'AWS::EKS::FargateProfile'
    DependsOn:
      - EKSCluster
      - EKSIAMFargateRole
    Properties:
      FargateProfileName: kube-system
      ClusterName: !Sub 'my-cluster-${Stage}'
      PodExecutionRoleArn:
        "Fn::GetAtt": [ "EKSIAMFargateRole", "Arn" ]
      Subnets:
        - !Ref PrivateSubnet01
        - !Ref PrivateSubnet02
      Selectors:
        - Namespace: kube-system
          Labels:
            - Key: k8s-app
              Value: kube-dns

Please suggest If I'm missing anything and why the fargate profile for kube-system is not working.

enter image description here

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

知足的幸福 2025-02-11 15:40:00
...
Selectors:
- Namespace: kube-system
  Labels:  # <-- here
  - Key: k8s-app
    Value: kube-dns

您有标签设置,这意味着仅带有标签(K8S-APP:KUBE-DNS)的POD将在Fargate上运行。删除标签要求,并且群集中的所有POD kube-system名称空间将在Fargate上运行。

...
Selectors:
- Namespace: kube-system
  Labels:  # <-- here
  - Key: k8s-app
    Value: kube-dns

You have Labels setup which means only pod with the labels (k8s-app: kube-dns)will be running on Fargate. Remove the Labels requirement and all pods in your cluster kube-system namespace will run on Fargate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文