-
Notifications
You must be signed in to change notification settings - Fork 97
Operator fails after deployment - with access denied error for sqs #173
Comments
I think when you use kube2iam and you specify the base role arn it's meant to not include the ARN name. so instead of |
@christopherhein - thanks I'll give it a try, what I did to work around the SQS issue for now is just didn't deploy it, so I rebuilt the operator and removed the sqs yaml from the models - and the operator started right up and ran and I was able to successfully provision a few S3 buckets. I see the config map and service was generated, now I'm wondering how I use these resources in a pod? Are there any simple examples of that? |
The difficult thing here is by removing the SQS setup you don't have the operator lifecycle, it purely creates the resources but doesn't have any knowledge of them following that. SQS was used to get the events from the stacks and when it returned a successful response it reaches out and collects the The common example is https://aws.amazon.com/blogs/opensource/aws-service-operator-kubernetes-available/ where you'll see the pod in the example: ---
apiVersion: service-operator.aws/v1alpha1
kind: DynamoDB
metadata:
name: dynamo-table
spec:
hashAttribute:
name: name
type: S
rangeAttribute:
name: created_at
type: S
readCapacityUnits: 5
writeCapacityUnits: 5
---
apiVersion: v1
kind: Service
metadata:
name: frontend
spec:
selector:
app: frontend
ports:
- port: 80
targetPort: http-server
name: http
type: LoadBalancer
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: frontend
labels:
app: frontend
spec:
replicas: 1
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
containers:
- name: frontend
image: christopherhein/dynamoapp:latest
imagePullPolicy: Always
env:
- name: TABLE_NAME
valueFrom:
configMapKeyRef:
name: dynamo-table
key: tableName
resources:
requests:
memory: "512m"
cpu: "512m"
ports:
- name: http-server
containerPort: 8080 You'll notice in this that the pod uses a configmap which isn't declared that configmap is created by the operator following successful messages from the CFN stacks. |
ok, so without SQS the S3 operator did successfully create my bucket and config map, just as a reference, but I'm not sure if you have a sample app similar to the dynamoapp above to test out the S3 kube stuff?
|
Wow, that's fantastic, and I'm not sure how that's possible LOL. But either way amazing. Might be some other SQS work that is built-in. I do have an S3 example, we're in the process of reupdating the workshop to include it but this sample uses dynamo and S3 together, it requires a couple manual steps I want to remove such as getting the load balancer address from the service but you can step through the steps here - https://eksworkshop.com/pr-62/operator/ |
Also getting the same problem with https://github.com/awslabs/aws-service-operator/releases/tag/v0.0.1-alpha4
kube2iam is deployed with helm, and uses
Update: the problem seems to be due to an improperly setup kube2iam. On the other hand, I had no luck with:
The resulting image, when deployed still wanted to create an sqs queue. |
I'm using alpha4 version
I keep getting this error when I deploy the aws-service-operator.yaml and not sure what config I'm missing, does anyone have any insight into this? My account has full access and I can manually create and delete SQS queues through the aws console- so I'm pretty sure this isn't a permission issue related to my account id.
Could it be a CloudFormation stack issue - I have an
aws-service-operator-role
stack created with the following WorkerArnarn:aws:iam::<hidden>:role/nodes.screeley-aws1.screeley.sysdeseng.com
One thing I've noticed, if I track the request to CreateQueue through
CloudTrails
I see that the request comes from some account that I don't recognize and it gets theaccess denied
error, any idea on what I'm missing to tie kube2iam + CloudFormation stack to my operator SA?As for the kube2iam I have deployed with several different ARNs and they all result in same behavior as above and same basic output in kube2iam logs.
or if I don't do the
auto-discover-base-arn
I just getListening on port 8181
- I don't even really care about SQS, I'm just trying to get the default operator running so I can experiment with itThe text was updated successfully, but these errors were encountered: