-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKubernetes_KOPS_setup
48 lines (28 loc) · 1.19 KB
/
Kubernetes_KOPS_setup
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
curl -LO https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-linux-amd64
chmod +x kops-linux-amd64
sudo mv kops-linux-amd64 /usr/local/bin/kops
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/bin/kubectl
aws s3 mb s3://linuxworld.in.k8s --region ap-south-1
Create private hosted zone in AWS Route53
export KOPS_CLUSTER_NAME=jenkinstraining.com
export KOPS_STATE_STORE=s3://linuxworld.in.k8s
# vim /root/.bashrc
export KOPS_CLUSTER_NAME=jenkinstraining.com
export KOPS_STATE_STORE=s3://linuxworld.in.k8s
ssh-keygen
kops create cluster \
--state=${KOPS_STATE_STORE} \
--node-count=2 \
--master-size=t3.medium \
--node-size=t3.medium \
--zones=ap-south-1a,ap-south-1b \
--name=${KOPS_CLUSTER_NAME} \
--dns private \
--master-count 1
kops get cluster
kops update cluster --name jenkinstraining.com --yes --admin
kops validate cluster --wait 10m
ssh -i ~/.ssh/id_rsa [email protected]
kops delete cluster --yes