-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
cristov
committed
Aug 13, 2018
1 parent
45fd32f
commit 0ff0f59
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# aws-auth ConfigMap script | ||
#title aws-auth-cm.sh | ||
#description This script will add a ConfigMap aws-auth to the EKS cluster k8s-workshop, allowing the worker nodes to join the cluster. | ||
#author @buzzsurfr | ||
#contributors @buzzsurfr @dalbhanj @cloudymind | ||
#date 2018-06-05 | ||
#version 0.1 | ||
#usage curl -sSL https://s3.amazonaws.com/aws-kubernetes-artifacts/v0.5/aws-auth-cm.sh | bash -s stable | ||
#============================================================================== | ||
|
||
curl -O https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-06-05/aws-auth-cm.yaml | ||
export EKS_WORKER_ROLE=$(aws cloudformation describe-stacks --stack-name k8s-workshop-worker-nodes | jq -r '.Stacks[0].Outputs[]|select(.OutputKey=="NodeInstanceRole")|.OutputValue') | ||
sed -i -e "s#<ARN of instance role (not instance profile)>#${EKS_WORKER_ROLE}#g" aws-auth-cm.yaml | ||
kubectl apply -f aws-auth-cm.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: aws-auth | ||
namespace: kube-system | ||
data: | ||
mapRoles: | | ||
- rolearn: arn:aws:iam::219737062836:role/k8s-workshop-worker-nodes-NodeInstanceRole-FSWFXG84GZ1Y | ||
username: system:node:{{EC2PrivateDNSName}} | ||
groups: | ||
- system:bootstrappers | ||
- system:nodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: aws-auth | ||
namespace: kube-system | ||
data: | ||
mapRoles: | | ||
- rolearn: <ARN of instance role (not instance profile)> | ||
username: system:node:{{EC2PrivateDNSName}} | ||
groups: | ||
- system:bootstrappers | ||
- system:nodes |
Binary file not shown.