-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about how userTokenSOPS authenticate EKS clusters #5
Comments
hi @tongtianqi777 @yuchaoran2011 Any idea why userTokenSOPS doesn't work? |
Hi @lixmgl , just to confirm: this is a remote AWS EKS cluster you are submitting the Spark app to, correct? can you confirm both the service account and secret exist? the some more details: https://itnext.io/big-change-in-k8s-1-24-about-serviceaccounts-and-their-secrets-4b909a4af4e0 |
Hi @tongtianqi777 , |
I think the issue is with the I can see the token refresh feature is added to later version of fabric8io/kubernetes-client >5.12.x I will test and raise a PR with the latest version. WARNING |
Thanks for the context Vara. We still want to figure out why this token works for Apple since regardless of expiration, this token doesn't work for our eks cluster.
|
Just a dummy question, do you use multiple lines of strings when setting I remember when I copy/paste the token string to the config yaml file, the IntelliJ IDE will automatically split that to multiple lines, and I have to manually put them back together as a single very long line. |
Thanks for checking. |
Got it, it is different issue then. |
@lixmgl Could it be possible that your remote Spark EKS cluster is missing some security group configurations that prevent your bpg instance from talking to it? |
@yuchaoran2011 what kind of security groups you set for EKS cluster? We use standard EKS cluster. cat ~/.kube/config
|
@lixmgl I didn't mean your local kubectl config. I was thinking about the remote EKS cluster that you are submitting applications to. The Security Groups section of your EC2 Management Console should show the list of security groups currently configured. You'll want to have an inbound rule that tells the nodes in the cluster to accept HTTPS traffic with TCP at port 443 from anywhere (in production, inbound connections will be only allowed from the EKS cluster that runs BPG). |
@yuchaoran2011 I see. |
@lixmgl, another option is to write some simple Java code to call your EKS API server and see what will happen. You could follow code example from here:
|
Also, would you check whether the service account is set up with proper role and rolebinding? See discussion here. |
@hiboyang Thanks for the suggestion! I will investigate more. |
This issue is resolved by upgrading the fabric k8s client lib to the latest version. Please confirm @lixmgl Thanks |
We are getting unauthorized error when submit App to EKS cluster in this step:
https://github.com/apple/batch-processing-gateway/blob/main/docs/GETTING_STARTED.md#submit-a-spark-app
Error message is:
userTokenSOPS is generated from https://github.com/apple/batch-processing-gateway/blob/main/dev-setup/generate-bpg-config.sh#L17
This token comes from spark service account secret, do you need any additional setup on cluster level to make this authentication work?
Thanks.
The text was updated successfully, but these errors were encountered: