当前位置:网站首页>Eksctl deploying AWS eks
Eksctl deploying AWS eks
2022-04-23 04:33:00 【Heavy dust】
Catalog
One 、 Tool installation
1.1 install kubectl
stay Linux Installation on kubectl
-
from Amazon S3 For clustered Kubernetes Version download Amazon EKS Provided
kubectl
Binary . To download Arm edition , Please putamd64
Change toarm64
, Then run the corresponding command .-
Kubernetes 1.21:
curl -o kubectl https://amazon-eks.s3-us-west-2.amazonaws.com/1.21.2/2021-07-05/bin/linux/amd64/kubectl
-
Kubernetes 1.20:
curl -o kubectl https://amazon-eks.s3-us-west-2.amazonaws.com/1.20.4/2021-04-12/bin/linux/amd64/kubectl
-
Kubernetes 1.19:
curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.19.6/2021-01-05/bin/linux/amd64/kubectl
-
Kubernetes 1.18:
curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.18.9/2020-11-02/bin/linux/amd64/kubectl
-
-
Apply execution permissions to binaries .
chmod +x ./kubectl
-
Copy the binaries to your
PATH
Folder in . If you have installed a version ofkubectl
, It is recommended that you create a$HOME/bin/kubectl
And ensure$HOME/bin
First appear in your$PATH
in .mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$PATH:$HOME/bin
-
( Optional ) take
$HOME/bin
Path added to shell Initialization file , In order to open shell Configure this path when .Be careful
This step assumes that you use Bash Shell; If you use other Shell, Please change the command to use your specific Shell Initialization file of .
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
-
install
kubectl
after , You can verify its version by using the following command :kubectl version --short --client
1.2 install eksctl
Use eksctl
stay Linux Install or upgrade on curl
-
Use the following command to download and extract the latest version of
eksctl
.curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
-
Move the extracted binary to
/usr/local/bin
.sudo mv /tmp/eksctl /usr/local/bin
-
Use the following command to test whether your installation is successful .
eksctl version
1.3 install Helm( Optional )
-
If you will macOS And Homebrew In combination with , Please use the following command to install binaries .
brew install helm
-
If you will Windows And Chocolatey In combination with , Please use the following command to install binaries .
choco install kubernetes-helm
-
If you are using Linux, Please use the following command to install binaries .
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 $ chmod 700 get_helm.sh $ ./get_helm.sh
Two 、 Imperative creation
2.1 establish Amazon EC2 Linux Managed node cluster
eksctl create cluster \
--name my-cluster \
--region us-west-2 \
--with-oidc \
--ssh-access \
--ssh-public-key <your-key> \
--managed
2.2 establish Fargate Linux node
eksctl create cluster \
--name my-cluster \
--region us-west-2 \
--fargate
2.3 See the resources
kubectl get nodes -o wide
2.4 Delete cluster
eksctl delete cluster --name my-cluster --region us-west-2
3、 ... and 、 The configuration file (yaml) establish
3.1 No choice VPC
nodeGroups
Is an unmanaged node group ,managedNodeGroups
by EKS Managed node group , Managed node groups can be displayed on the console .
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: basic-cluster
region: eu-north-1
nodeGroups:
- name: ng-1
instanceType: m5.large
desiredCapacity: 10
volumeSize: 80
ssh:
allow: true # will use ~/.ssh/id_rsa.pub as the default ssh key
- name: ng-2
instanceType: m5.xlarge
desiredCapacity: 2
volumeSize: 100
ssh:
publicKeyPath: ~/.ssh/ec2_id_rsa.pub
managedNodeGroups:
- name: ng-1-workers
labels: {
role: workers }
instanceType: m5.xlarge
desiredCapacity: 10
volumeSize: 80
privateNetworking: true
- name: ng-2-builders
labels: {
role: builders }
instanceType: m5.2xlarge
desiredCapacity: 2
volumeSize: 100
privateNetworking: true
3.2 Select an existing VPC
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: cluster-in-existing-vpc
region: eu-north-1
vpc:
subnets:
private:
eu-north-1a: {
id: subnet-0ff156e0c4a6d300c }
eu-north-1b: {
id: subnet-0549cdab573695c03 }
eu-north-1c: {
id: subnet-0426fb4a607393184 }
nodeGroups:
- name: ng-1-workers
labels: {
role: workers }
instanceType: m5.xlarge
desiredCapacity: 10
privateNetworking: true
- name: ng-2-builders
labels: {
role: builders }
instanceType: m5.2xlarge
desiredCapacity: 2
privateNetworking: true
iam:
withAddonPolicies:
imageBuilder: true
3.3 Run the create command
eksctl create cluster -f cluster.yaml
3.4 Delete cluster
eksctl delete cluster -f cluster.yaml
Reference resources
eksctl:https://eksctl.io/introduction/
AWS EKS file : https://docs.aws.amazon.com/zh_cn/eks/latest/userguide/what-is-eks.html
版权声明
本文为[Heavy dust]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230413460252.html
边栏推荐
- Matlab minimalist configuration of vscode configuration
- How to regulate intestinal flora? Introduction to common natural substances, probiotics and prebiotics
- mysql table 中增加列的SQL语句
- LabVIEW 小端序和大端序区别
- 国外LEAD,联盟经理常见问答
- 阿里十年技术专家联合打造“最新”Jetpack Compose项目实战演练(附Demo)
- Mysql---数据读写分离、多实例
- 【测绘程序设计】坐标方位角推算神器(C#版)
- win10, mysql-8.0.26-winx64. Zip installation
- 2020 is coming to an end, special and unforgettable.
猜你喜欢
Cortex-M3寄存器组、汇编语言与C语言的接口介绍
【测绘程序设计】坐标反算神器V1.0(附C/C#/VB源程序)
MYSQL50道基础练习题
Alibaba cloud IOT transfer to PostgreSQL database scheme
AWS EKS 部署要点以及控制台与eksctl创建的差异
指纹Key全国产化电子元件推荐方案
Fusobacterium -- symbiotic bacteria, opportunistic bacteria, oncobacterium
Stm32f4 MCU ADC sampling and FFT of ARM-DSP Library
520.检测大写字母
zynq平臺交叉編譯器的安裝
随机推荐
小红书被曝整体裁员20%,大厂之间内卷也很严重
Express middleware ② (classification of Middleware)
Gut liver axis: host microbiota interaction affects hepatocarcinogenesis
mysql ,binlog 日志查询
QtSpim手册-中文翻译
【BIM入门实战】Revit建筑墙体:构造、包络、叠层图文详解
【Echart】echart 入门
MATLAB lit plusieurs diagrammes fig et les combine en un seul diagramme (sous forme de sous - Diagramme)
Use recyclerview to realize left-right side-by-side classification selection
Matlab reads multiple fig graphs and then combines them into one graph (in the form of sub graph)
兼容NSR20F30NXT5G的小体积肖特基二极管
华为机试--高精度整数加法
Xiaohongshu was exposed to layoffs of 20% as a whole, and the internal volume among large factories was also very serious
【BIM入门实战】Revit中的墙体层次以及常见问题解答
Iron and intestinal flora
Redis 命令大全
Chapter 4 - understanding standard equipment documents, filters and pipelines
Go 语言中的 logger 和 zap 日志库
Fusobacterium -- symbiotic bacteria, opportunistic bacteria, oncobacterium
IEEE Transactions on Industrial Informatics(TII)投稿须知