Deploy to EKS cluster using AWS codepipleine
User "Kubernetesdeployment" cannot get resource "deployments" in API group "apps" in the namespace "default"
If "Kubernetesdeployment" is a ServiceAccount that AWS CodePipeline uses to deploy, it looks like it is missing the necessary RBAC permissions to deploy "Deployment" in namespace "default".
Using RBAC Authorization may be helpful. Usually, you want to create and read both "Deployment", "Service" and possibly "Ingress" for deploying apps to a specific namespace.
From the link that you had followed, it looks like it miss point 4.
- Make kubernetes_deployment role as authorized in eks cluster
alternatively, that you have set the permissions to a different service account name? username: kubernetes_deployment
is named Kubernetesdeployment
in your error message.
Please also look at AWS recommended deployment methodology to EKS with CodePipeline:
Continuous Deployment to Kubernetes using AWS CodePipeline, AWS CodeCommit, AWS CodeBuild, Amazon ECR and AWS Lambda - https://aws.amazon.com/blogs/devops/continuous-deployment-to-kubernetes-using-aws-codepipeline-aws-codecommit-aws-codebuild-amazon-ecr-and-aws-lambda/