- Не применяем aws-auth ConfigMap пока не выполниили п.1 (чтобы ноды не джойнились с дефолтным CNI)
- Удаляем DaemonSet aws-node
- Применяем Calico манифест из официальной доки
Last active
July 15, 2019 20:42
-
-
Save gree-gorey/3169c811150368dae239f1e52defc922 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
set -o xtrace | |
rm -rf /etc/cni/net.d/* | |
ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) | |
REGION=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r '.region') | |
LIFECYCLE=$(aws ec2 describe-instances --region=$REGION --instance-ids=$ID | jq -r '.Reservations[].Instances[].InstanceLifecycle') | |
if [[ $LIFECYCLE = "spot" ]]; then | |
EXTRA_ARGS="--node-labels=lifecycle=Ec2Spot,aws.amazon.com/spot=true,node-role.kubernetes.io/spot-worker="; | |
else | |
EXTRA_ARGS="--node-labels=node-role.kubernetes.io/worker="; | |
fi | |
/etc/eks/bootstrap.sh --apiserver-endpoint '${aws_eks_cluster.eks.endpoint}' --b64-cluster-ca '${aws_eks_cluster.eks.certificate_authority[0].data}' '${var.cluster_name}' --kubelet-extra-args "--max-pods=200 $EXTRA_ARGS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment