-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathKops-command.yaml
More file actions
45 lines (34 loc) · 1.62 KB
/
Kops-command.yaml
File metadata and controls
45 lines (34 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
DNS NAME
S3 BUCKET
CREATE A EC2 WITH T2.MEDIUM
IAM ROLE AND ASSIGN IT TO EC2
CONNECT TO EC2 INSTANCE AND GENERATE SSH ROLE
download Kops and Kubectl to usr/local/bin and change permissions.
# Download Kubectl and give permissions.
# edit .bashrc and add all the env variables
export NAME=cloudrayeez.xyz
export KOPS_STATE_STORE=s3://cloudrayeez.xyz
export AWS_REGION=us-east-1
export CLUSTER_NAME=cloudrayeez.xyz
export EDITOR='/usr/bin/nano'
#export K8S_VERSION=1.6.4
# After copying the above files to .bashrc run “ source .bashrc ”.
# Create a Cluster using Kops and generate a cluster file and save it carefully and do neccessary changes
kops create cluster --name=cloudrayeez.xyz \
--state=s3://cloudrayeez.xyz --zones=us-east-1a,us-east-1b \
--node-count=2 --control-plane-count=1 --node-size=t3.medium --control-plane-size=t3.medium \
--control-plane-zones=us-east-1a --control-plane-volume-size 10 --node-volume-size 10 \
--ssh-public-key ~/.ssh/id_ed25519.pub \
--dns-zone=cloudrayeez.xyz --dry-run --output yaml
# 6 Node cluster
# kops create cluster --name=cloudrayeez.xyz \
# --state=s3://cloudrayeez.xyz --zones=us-east-1a,us-east-1b,us-east-1c \
# --node-count=3 --master-count=3 --node-size=t3.medium --master-size=t3.medium \
# --master-zones=us-east-1a,us-east-1b,us-east-1c --master-volume-size 10 --node-volume-size 10 \
# --ssh-public-key ~/.ssh/id_rsa.pub \
# --dns-zone=cloudrayeez.xyz --dry-run --output yaml
# One done run below commands to create the cluster
kops create -f cluster.yml
kops update cluster --name cloudrayeez.xyz --yes --admin
kops validate cluster --wait 10m
kops delete -f cluster.yml --yes