Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
73 lines (51 sloc) 1.92 KB
Step 0: Install aws cli:
$ sudo chown -R $(whoami) /usr/local/lib
$ brew install kubernetes-cli
Step 1: Install aws-iam-authenticator (on Mac OS)
curl -o aws-iam-authenticator.sha256 https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.5/2018-12-06/bin/darwin/amd64/aws-iam-authenticator.sha256
openssl sha -sha256 aws-iam-authenticator
aws-iam-authenticator help
chmod +x aws-iam-authenticator
./aws-iam-authenticator help
cp aws-iam-authenticator $HOME/bin/aws-iam-authenticator
export PATH=$HOME/bin:$PATH
export PATH=$HOME:$PATH
aws-iam-authenticator help
Step 2: run aws configure
$ aws --version
aws-cli/1.16.84 Python/2.7.10 Darwin/18.2.0 botocore/1.12.74
$ aws eks update-kubeconfig --name k8s
You must specify a region. You can also configure your region by running "aws configure".
$ aws configure
AWS Access Key ID:
AWS Secret Access Key:
Default region name []:
Default output format []:
Step 3: run update-kubeconfig
$ aws eks update-kubeconfig --name k8s
$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
Step 4: attach cloud formation to EKS and start EC2 nodes
$ curl -O https://amazon-eks.s3-us-west-2.amazonaws.com/cloudformation/2018-12-10/aws-auth-cm.yaml
$ vi aws-auth-cm.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: aws-auth
namespace: kube-system
data:
mapRoles: |
- rolearn: arn:aws:iam::<>
username: system:node:{{EC2PrivateDNSName}}
groups:
- system:bootstrappers
- system:nodes
$ kubectl apply -f aws-auth-cm.yaml
$ kubectl get nodes --watch
NAME STATUS ROLES AGE VERSION
Step 5: scale cloud formation, add one more node
$ kubectl get nodes
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
netperf-tester-client-776474847-zchvl 1/1 Running 0 46m
netperf-tester-host-5f4f49446f-6tbhd 0/1 Pending 0 1m
You can’t perform that action at this time.