当前位置:网站首页>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
边栏推荐
- 那些年我面试过的Android开发岗总结(附面试题+答案解析)
- [mapping program design] coordinate inverse artifact v1 0 (with C / C / VB source program)
- The perfect combination of collaborative process and multi process
- LabVIEW 小端序和大端序区别
- 【Echart】echart 入門
- QML进阶(四)-绘制自定义控件
- Thought of reducing Governance -- detailed summary of binary search
- A new method for evaluating the quality of metagenome assembly - magista
- 第四章 --- 了解标准设备文件、过滤器和管道
- 【BIM+GIS】ArcGIS Pro2. 8 how to open Revit model, Bim and GIS integration?
猜你喜欢

C语言:恶搞小游戏

【Echart】echart 入門

Bridge between ischemic stroke and intestinal flora: short chain fatty acids

洛谷P1858 【多人背包】 (背包求前k优解)

zynq平台交叉编译器的安装

Use recyclerview to realize left-right side-by-side classification selection

Express中间件②(中间件的分类)

383. 赎金信

C语言: 指针的进阶

Xiaohongshu was exposed to layoffs of 20% as a whole, and the internal volume among large factories was also very serious
随机推荐
Effects of antibiotics on microbiome and human health
【BIM入门实战】Revit中的墙体层次以及常见问题解答
Summary of Android development posts I interviewed in those years (attached test questions + answer analysis)
2021数学建模国赛一等奖经验总结与分享
Error occurs when thymeleaf th: value is null
Network principle | connection management mechanism in TCP / IP important protocol and core mechanism
Understand the gut organ axis, good gut and good health
MySQL 2013 lost connection to MySQL server during query
LabVIEW 小端序和大端序区别
记录一下盲注脚本
matlab读取多张fig图然后合并为一张图(子图的形式)
The perfect combination of collaborative process and multi process
Interaction of diet gut microbiota on cardiovascular disease
Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15.
test
【测绘程序设计】坐标方位角推算神器(C#版)
Bacterial infection and antibiotic use
[AI vision · quick review of NLP natural language processing papers today, issue 31] Fri, 15 APR 2022
[AI vision · quick review of robot papers today, issue 32] wed, 20 APR 2022
Nel ASA: her ø Ya facility in Norway officially opened