AWS EKS secret encryption

0

Hi, from some time I have EKS cluster and now I want to enable the cluster secrets encryption with the use of my KMS key. In documentation it's mentioned: After you enabled encryption on your cluster, you must encrypt all existing secrets with the new key

But in a console I read that it will be automatically encrypted. What action should take after I enabled this encryption. In my cluster I have a lot of secrets for different namespaces (argocd, kube prometheus stack and so on...). I don't want to break anything.

Thank you, M

1개 답변
1
수락된 답변

Hello there,

When enabling secret encryption on an existing cluster, you have 2 options depending on your use case:

  1. Have your secrets re-encrypt automatically
  2. Opt out of automatically re-encrypting your secrets

You do not need to take any other steps if you haven't set this flag --encrypt-existing-secrets=false If you enabled encryption to your cluster with this single command below:

eksctl utils enable-secrets-encryption \
    --cluster my-cluster \
    --key-arn arn:aws:kms:region-code:account:key/key

The following operations will be performed:

  • KMS encryption successfully enabled on cluster
  • updating all Secret resources to apply KMS encryption in the cluster

Refer to the doc here for the steps

AWS
Olawale
답변함 일 년 전
  • Hi. If I have one repo with Argo CD applications, and two clusters/ two different AWS accounts are watching this repo. For secrets just the {env} key is different. It means if encrypt the secret in one account/eks cluster with one kms key, another cluster/account will not have access to this secret? I would have to share KMS key between clusters/accounts? Sounds scary, if I lose access to secrets.

  • Your 1st point means that I just enable encryption via AWS console for EKS cluster and it's done? Then how can check if my existing secrets are encrypted?

  • Yes, you just need to enable encryption via the AWS console for the EKS cluster and it will automatically encrypt existing k8s secrets in the cluster. You can check if your existing secrets are encrypted by checking for the Decrypt API call Events in CloudTrail. From AWS Console >> CloudTrail >> Event history >> For Lookup attributes, choose Event Name from the drop down >> For Enter an Event Name, paste Decrypt. Choose the time range when you enable encryption for the cluster. The number of Decrypt calls should be equivalent to the number of existing secrets you have in the cluster.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠