Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
aws iam create-policy --policy-name cni_iam_policy --policy-document file://cni_iam.json

Add Add-on Amazon VPC CNI with the IRSA to enable pod networking

Code Block
languagebash


new_policy_arn=$(aws iam list-policies --query 'Policies[?PolicyName==`cni_iam_policy`].[Arn]' --scope Local --no-cli-pager --output text)

eksctl create addon --name vpc-cni \

Then use eksctl to override the existing AWS CNI IRSA settings:

Code Block
languagebash
eksctl update iamserviceaccount \                                                                                                                   --cluster <cluster_name> \     (ivan@isim--version latest \
 dev2.us-west-1.eksctl.io/default)
  --name aws-node \
  ---attach-policy-arn ${new_policy_arn} \
namespace kube-system \
  --cluster <cluster_name> \
   --attach-policy-arn arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy \
  --attach-policy-arn "${new_policy_arn}" \
  --approve