当前位置:网站首页>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
kubectlBinary . To download Arm edition , Please putamd64Change 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
PATHFolder in . If you have installed a version ofkubectl, It is recommended that you create a$HOME/bin/kubectlAnd ensure$HOME/binFirst appear in your$PATHin .mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$PATH:$HOME/bin -
( Optional ) take
$HOME/binPath 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
kubectlafter , 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
边栏推荐
- 减治思想——二分查找详细总结
- Interaction of diet gut microbiota on cardiovascular disease
- [AI vision · quick review of NLP natural language processing papers today, issue 31] Fri, 15 APR 2022
- 记录一下盲注脚本
- Phishing for NFT
- 用D435i录制自己的数据集运行ORBslam2并构建稠密点云
- Jetpack 之 LifeCycle 组件使用详解
- MySQL 2013 lost connection to MySQL server during query
- [AI vision · quick review of NLP natural language processing papers today, No. 32] wed, 20 APR 2022
- A new method for evaluating the quality of metagenome assembly - magista
猜你喜欢

Coinbase:关于跨链桥的基础知识、事实和统计数据

IDE Idea 自动编译 与 On Upate Action 、 On Frame Deactivation 的配置

Effects of antibiotics on microbiome and human health
![[BIM introduction practice] wall hierarchy and FAQ in Revit](/img/95/e599c7547029f57ce23ef4b87e8b9a.jpg)
[BIM introduction practice] wall hierarchy and FAQ in Revit

【BIM入门实战】Revit建筑墙体:构造、包络、叠层图文详解

C语言常用字符串处理函数

用D435i录制自己的数据集运行ORBslam2并构建稠密点云

VSCode配置之Matlab极简配置
![[AI vision · quick review of NLP natural language processing papers today, issue 31] Fri, 15 APR 2022](/img/40/72fdf9c89ed7d063cc368e6e052d0f.png)
[AI vision · quick review of NLP natural language processing papers today, issue 31] Fri, 15 APR 2022

Alibaba cloud IOT transfer to PostgreSQL database scheme
随机推荐
QML进阶(五)-通过粒子模拟系统实现各种炫酷的特效
TreeSet after class exercises
VHDL implementation of 32-bit binary to BCD code
Basic use of shell WC (counting the number of characters)
A lifetime of needs, team collaboration can play this way on cloud nailing applet
C语言常用字符串处理函数
[AI vision · quick review of today's sound acoustic papers, issue 2] Fri, 15 APR 2022
io.Platform.packageRoot; // ignore: deprecated_member_use
Single chip microcomputer serial port data processing (1) -- serial port interrupt sending data
[mapping program design] coordinate inverse artifact v1 0 (with C / C / VB source program)
Bacterial infection and antibiotic use
阿里云IoT流转到postgresql数据库方案
QML进阶(四)-绘制自定义控件
VHDL语言实现32位二进制数转BCD码
Installation of zynq platform cross compiler
国外LEAD,联盟经理常见问答
兼容NSR20F30NXT5G的小体积肖特基二极管
eksctl 部署AWS EKS
KVM error: Failed to connect socket to ‘/var/run/libvirt/libvirt-sock‘
Go反射—Go语言圣经学习笔记