aws eks 通过eksctl 创建nodegroup


参考官方文档:https://eksctl.io/usage/managing-nodegroups/

创建nodegroup命令

eksctl create nodegroup --cluster=<clusterName> [--name=<nodegroupName>]

例如
eksctl create nodegroup --cluster=faberbeta --name=high-memory-group

看样子这个方式不是很好,因为不能详细配置nodegroup服务器的配置

推荐使用--config-file指定配置文件来创建nodegroup

命令:
eksctl create nodegroup --config-file=high-memory-cluster.yaml

high-memory-cluster.yaml的配置文件

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: faberbeta
  region: ap-east-1

managedNodeGroups:
  - name: high-mem-nodegroup
    instanceType: r5.large
    minSize: 3
    maxSize: 6
    desiredCapacity: 3
    volumeSize: 30
    ssh:
      allow: true
      publicKeyPath: /root/.ssh/id_rsa.pub
    labels: {role: worker}
    tags:
      nodegroup-role: worker
    iam:
      withAddonPolicies:
        imageBuilder: true
        autoScaler: true
        externalDNS: true
        certManager: true
        appMesh: true
        appMeshPreview: true
        ebs: true
        fsx: true
        efs: true
        albIngress: true
        xRay: true
        cloudWatch: true


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM