eksctl创建eks集群

网友投稿 266 2022-09-29

eksctl创建eks集群

# cat andy.yaml

apiVersion: eksctl.io/v1alpha5

kind: ClusterConfig

metadata:

name: andy-eks

region: us-east-2

version: "1.21"

kubernetesNetworkConfig:

ipFamily: IPv4

serviceIPv4CIDR: 172.19.0.0/19

iam:

serviceRoleARN: arn:aws:iam::123456789101:role/AmazonEKSClusterRole-andyeks

withOIDC: true

vpc:

id: vpc-09e9ca28b21234b9a

cidr: "172.27.0.0/16"

subnets:

public:

public-01:

id: subnet-0e79794b0d12349b6

public-02:

id: subnet-0f56aad8431234686

public-03:

id: subnet-0b3fc1c8d541234de

private:

private-01:

id: subnet-0e9d112347003267e

private-02:

id: subnet-057bd4e123401c71c

private-03:

id: subnet-0774feb811234d64a

managedNodeGroups:

- name: NodeGroup01-private

instanceType: m5.large

instanceName: andyeks-node

minSize: 2

maxSize: 8

desiredCapacity: 3

volumeSize: 160

volumeType: gp2

amiFamily: AmazonLinux2

ssh:

allow: true

publicKeyName: andy-sshkey

sourceSecurityGroupIds: ["sg-04e796b012346ee43"]

privateNetworking: true

tags:

Name: andyeks-nodeGroups

updateConfig:

maxUnavailable: 1

labels:

nodegroup-type: frontend-workloads

iam:

instanceRoleARN: arn:aws:iam::123456789101:role/AmazonEKSNodeRole-andyeks

# AWS_PROFILE=sztu-andy eksctl create cluster -f andy.yaml

2022-01-19 09:00:46 [ℹ]  eksctl version 0.79.0

2022-01-19 09:00:46 [ℹ]  using region us-east-2

2022-01-19 09:00:46 [✔]  using existing VPC (vpc-09e9ca28b21234b9a) and subnets (private:map[private-01:{subnet-09e9ca28b21234b9a us-east-2a 172.27.128.0/19} private-02:{subnet-09e9ca28b21234b9a us-east-2b 172.27.160.0/19} private-03:{subnet-09e9ca28b21234b9a us-east-2c 172.27.192.0/19}] public:map[public-01:{subnet-09e9ca28b21234b9a us-east-2a 172.27.0.0/19} public-02:{subnet-09e9ca28b21234b9a us-east-2b 172.27.32.0/19} public-03:{subnet-09e9ca28b21234b9a us-east-2c 172.27.64.0/19}])

2022-01-19 09:00:46 [!]  custom VPC/subnets will be used; if resulting cluster doesn't function as expected, make sure to review the configuration of VPC/subnets

2022-01-19 09:00:46 [ℹ]  nodegroup "NodeGroup01-private" will use "" [AmazonLinux2/1.21]

2022-01-19 09:00:46 [ℹ]  using EC2 key pair "andy-sshkey"

2022-01-19 09:00:46 [ℹ]  using Kubernetes version 1.21

2022-01-19 09:00:46 [ℹ]  creating EKS cluster "andy-eks" in "us-east-2" region with managed nodes

2022-01-19 09:00:46 [ℹ]  1 nodegroup (NodeGroup01-private) was included (based on the include/exclude rules)

2022-01-19 09:00:46 [ℹ]  will create a CloudFormation stack for cluster itself and 0 nodegroup stack(s)

2022-01-19 09:00:46 [ℹ]  will create a CloudFormation stack for cluster itself and 1 managed nodegroup stack(s)

2022-01-19 09:00:46 [ℹ]  if you encounter any issues, check CloudFormation console or try 'eksctl utils describe-stacks --region=us-east-2 --cluster=andy-eks'

2022-01-19 09:00:46 [ℹ]  CloudWatch logging will not be enabled for cluster "andy-eks" in "us-east-2"

2022-01-19 09:00:46 [ℹ]  you can enable it with 'eksctl utils update-cluster-logging --enable-types={SPECIFY-YOUR-LOG-TYPES-HERE (e.g. all)} --region=us-east-2 --cluster=andy-eks'

2022-01-19 09:00:46 [ℹ]  Kubernetes API endpoint access will use default of {publicAccess=true, privateAccess=false} for cluster "andy-eks" in "us-east-2"

2022-01-19 09:00:46 [ℹ]

2 sequential tasks: { create cluster control plane "andy-eks",

2 sequential sub-tasks: {

4 sequential sub-tasks: {

wait for control plane to become ready,

associate IAM OIDC provider,

2 sequential sub-tasks: {

create IAM role for serviceaccount "kube-system/aws-node",

create serviceaccount "kube-system/aws-node",

},

restart daemonset "kube-system/aws-node",

},

create managed nodegroup "NodeGroup01-private",

}

}

2022-01-19 09:00:46 [ℹ]  building cluster stack "eksctl-andy-eks-cluster"

2022-01-19 09:00:47 [ℹ]  deploying stack "eksctl-andy-eks-cluster"

2022-01-19 09:01:17 [ℹ]  waiting for CloudFormation stack "eksctl-andy-eks-cluster"

2022-01-19 09:11:48 [ℹ]  waiting for CloudFormation stack "eksctl-andy-eks-cluster"

2022-01-19 09:15:49 [ℹ]  building iamserviceaccount stack "eksctl-andy-eks-addon-iamserviceaccount-kube-system-aws-node"

2022-01-19 09:15:49 [ℹ]  deploying stack "eksctl-andy-eks-addon-iamserviceaccount-kube-system-aws-node"

2022-01-19 09:15:49 [ℹ]  waiting for CloudFormation stack "eksctl-andy-eks-addon-iamserviceaccount-kube-system-aws-node"

2022-01-19 09:16:06 [ℹ]  waiting for CloudFormation stack "eksctl-andy-eks-addon-iamserviceaccount-kube-system-aws-node"

2022-01-19 09:16:22 [ℹ]  waiting for CloudFormation stack "eksctl-andy-eks-addon-iamserviceaccount-kube-system-aws-node"

2022-01-19 09:16:23 [ℹ]  serviceaccount "kube-system/aws-node" already exists

2022-01-19 09:16:23 [ℹ]  updated serviceaccount "kube-system/aws-node"

2022-01-19 09:16:23 [ℹ]  daemonset "kube-system/aws-node" restarted

2022-01-19 09:16:23 [ℹ]  building managed nodegroup stack "eksctl-andy-eks-nodegroup-NodeGroup01-private"

2022-01-19 09:16:23 [ℹ]  deploying stack "eksctl-andy-eks-nodegroup-NodeGroup01-private"

2022-01-19 09:16:23 [ℹ]  waiting for CloudFormation stack "eksctl-andy-eks-nodegroup-NodeGroup01-private"

2022-01-19 09:19:31 [ℹ]  waiting for CloudFormation stack "eksctl-andy-eks-nodegroup-NodeGroup01-private"

2022-01-19 09:19:31 [ℹ]  waiting for the control plane availability...

2022-01-19 09:19:31 [✔]  saved kubeconfig as "/root/.kube/config"

2022-01-19 09:19:31 [ℹ]  no tasks

2022-01-19 09:19:31 [✔]  all EKS cluster resources for "andy-eks" have been created

2022-01-19 09:19:31 [ℹ]  nodegroup "NodeGroup01-private" has 3 node(s)

2022-01-19 09:19:31 [ℹ]  node "ip-172-27-148-15.us-east-2.compute.internal" is ready

2022-01-19 09:19:31 [ℹ]  node "ip-172-27-171-154.us-east-2.compute.internal" is ready

2022-01-19 09:19:31 [ℹ]  node "ip-172-27-211-184.us-east-2.compute.internal" is ready

2022-01-19 09:19:31 [ℹ]  waiting for at least 2 node(s) to become ready in "NodeGroup01-private"

2022-01-19 09:19:31 [ℹ]  nodegroup "NodeGroup01-private" has 3 node(s)

2022-01-19 09:19:31 [ℹ]  node "ip-172-27-148-15.us-east-2.compute.internal" is ready

2022-01-19 09:19:31 [ℹ]  node "ip-172-27-171-154.us-east-2.compute.internal" is ready

2022-01-19 09:19:31 [ℹ]  node "ip-172-27-211-184.us-east-2.compute.internal" is ready

2022-01-19 09:19:32 [ℹ]  kubectl command should work with "/root/.kube/config", try 'kubectl get nodes'

2022-01-19 09:19:32 [✔]  EKS cluster "andy-eks" in "us-east-2" region is ready

root@ip-172-31-10-80:/opt/andy/eks#

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:使用Managed Identity实现无密连接数据库
下一篇:创建Java线程安全类的七种方法
相关文章

 发表评论

暂时没有评论,来抢沙发吧~