Why need to associate IAM OIDC Provider for Amazon EKS Cluster?
Amazon EKS cluster မှာ OpenID Connect (OIDC) provider ကို associate လုပ်ရခြင်းရဲ့ အဓိကအကြောင်းရင်းကတော့ Security နဲ့ Access Control ကို ပိုမိုကောင်းမွန်အောင်ပြုလုပ်နိုင်ဖို့ဖြစ်ပါတယ်။ အဓိကအားဖြင့် အချက် (၂) ချက်ရှိပါတယ်။
To use IAM Roles for Service Accounts (IRSA)
To authenticate user authentication to the Kubernetes Cluster
To use IAM Roles for Service Accounts (IRSA)
ပုံမှန်အားဖြင့် EKS cluster ထဲမှာ run နေတဲ့ application (pods) တွေက S3, DynamoDB, SQS စတဲ့ အခြား AWS service တွေကို သုံးဖို့လိုအပ်လာတဲ့အခါမှာ AWS credentials တွေကို လုံလုံခြုံခြုံနဲ့ ပေးဖို့လိုပါတယ်။ OIDC provider ကို EKS cluster နဲ့ associate လုပ်ထားတဲ့အခါမှာ Kubernetes service account တွေကို AWS IAM role တွေနဲ့ ချိတ်ဆက်ပေးနိုင်ပါတယ်။ ဒါကို IAM Roles for Service Accounts (IRSA) လို့ခေါ်ပါတယ်။ ဒီလိုချိတ်လိုက်တဲ့အခါမှာ pod တွေက IAM role ကို assume လုပ်ပြီး လိုအပ်တဲ့ AWS service တွေကို လုံခြုံစွာ access လုပ်နိုင်မှာဖြစ်ပါတယ်။
The advantages of using the IRSA
IRSA ကို အသုံးပြုခြင်းအားဖြင့် AWS access key တွေ၊ secret key တွေကို pod တွေထဲမှာ တိုက်ရိုက်သိမ်းထားစရာမလိုတော့ပါဘူး။ OIDC ကနေတစ်ဆင့် လုံခြုံတဲ့ temporary credentials တွေကို အသုံးပြုသွားမှာဖြစ်ပါတယ်။ Pod တစ်ခုချင်းစီအတွက်ကို credential တွေ လိုက်ပေးနေစရာမလိုဘဲ service account နဲ့ IAM role ကိုသာ ချိတ်ဆက်ပေးလိုက်ရုံနဲ့ အဆင်ပြေပါတယ်။ Pod အသစ်တွေတက်လာရင်လည်း အဲ့ဒီ service account ကို သုံးလိုက်တာနဲ့ လိုအပ်တဲ့ permission တွေကို အလိုအလျောက်ရရှိမှာပဲဖြစ်ပါတယ်။ Pod (or) service account တစ်ခု အတွက် လိုအပ်တဲ့ permission အတိအကျကိုသာ IAM role မှာ သတ်မှတ်ပေးထားနိုင်တဲ့အတွက် "least privilege" principle ကိုလည်း အလွယ်တကူ အကောင်အထည်ဖော်နိုင်ပါတယ်။
To authenticate user authentication to the Kubernetes Cluster
EKS cluster ကို kubectl ကနေတစ်ဆင့် အသုံးပြုမယ့် developer တွေ၊ administrator တွေကို AWS IAM user တွေနဲ့ပဲ access ပေးမယ့်အစား Google, Okta, Auth0 စတဲ့ OIDC-compliant identity provider တွေနဲ့လည်း authentication လုပ်နိုင်အောင် configure လုပ်နိုင်ပါတယ်။ ဆိုလိုတာက မိမိတို့ corporate မှာအသုံးပြုနေတဲ့ user management system (eg - Google Workspace) နဲ့ EKS cluster ကို ချိတ်ဆက်ထားလိုက်တဲ့အခါမှာ user တွေက သူတို့ရဲ့ ရှိရင်းစွဲ corporate account တွေနဲ့ပဲ kubectl command တွေကိုအသုံးပြုပြီး Cluster ကို access ရနေမှာဖြစ်ပါတယ်။ ဒါကြောင့် user management ကို တစ်နေရာတည်းကနေ စီမံခန့်ခွဲနိုင်ပြီး user တွေအတွက်လည်း ပိုပြီးအဆင်ပြေစေပါတယ်။ ဒါကြောင့် EKS cluster မှာ OIDC provider ကို associate လုပ်ခြင်းဟာ Kubernetes cluster အတွင်းက application တွေ (pods) ကို အခြား AWS service တွေနဲ့ လုံခြုံစွာ ချိတ်ဆက်အသုံးပြုနိုင်ဖို့ (IRSA) နဲ့ cluster ကို အသုံးပြုမယ့် user တွေကို external identity provider တွေနဲ့ authentication လုပ်နိုင်ဖို့အတွက် မရှိမဖြစ်လိုအပ်တဲ့ အဆင့်တစ်ခုဖြစ်ပါတယ်။
အားလုံးပဲအချိန်ပေးပြီးဖတ်ရှုပေးတဲ့အတွက် ကျေးဇူးတင်ပါတယ်။




