If you get an error like below that means you have a permission issue with the IAM role assigned.
To fix that issue you can first run “kubectl describe services hemalq-nginx” - hemalq-nginx is my the service and you will get actual issue with that.
Go into IAM and create a new policy
Select the JSON and paste the below mentioned policy
------------------------------------------------------------------------------------------------------------------
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iam:CreateServiceLinkedRole",
"Resource": "arn:aws:iam::*:role/aws-service-role/SERVICE-NAME.amazonaws.com/SERVICE-LINKED-ROLE-NAME-PREFIX*",
"Condition": {
"StringLike": {
"iam:AWSServiceName": "SERVICE-NAME.amazonaws.com"
}
}
},
{
"Effect": "Allow",
"Action": [
"iam:AttachRolePolicy",
"iam:PutRolePolicy"
],
"Resource": "arn:aws:iam::*:role/aws-service-role/SERVICE-NAME.amazonaws.com/SERVICE-LINKED-ROLE-NAME-PREFIX*"
}
]
}
------------------------------------------------------------------------------------------------------------------
Then as we done in the initial stage, assigned this newly created poly into the Ubuntu instance and run the create load balancer command
Then once you go into the AWS Loadbalancers, you will see there is a new LB created. Under instances, you can find two instances also added.
No comments:
Post a Comment