How does "ClusterRoleBinding" works and how do i get rid of it?

10/10/2021

It finally worked! I was able to host my ShinyApp over an EKS cluster with ShinyProxy and Kubernetes!

Unfortunately, I have now noticed that it doesn't quite work as I had imagined.

Briefly about my wishful thinking: My website integrates the load balancer via an iFrame. Users who visit my website can upload their data (without logging in or similar) and have it analysed accordingly in the tool. For this purpose, they should have their own R-session (via Shinyproxy). This means that the simultaneous users cannot look at each other's data and the evaluations run in parallel on the cluster, as everyone has their own R session.

How it is currently: There are two users: admin and guest. If you call the load balancer or ShinyProxy (via the load balancer), you have to authenticate yourself accordingly. Depending on the role with which you log in, you get your own session. However, if I log on to 2 devices as admin, my changes are only processed one after the other, but not in parallel (due to the role binding?).

As soon as I remove the authentication and the user tries to access the tool without authentication, the tool no longer starts.

I suspect that it is due to my "sp-authentication.yaml" file. The code looks like this:

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: shinyproxy-auth
subjects:
  - kind: ServiceAccount
    name: default
    namespace: default
roleRef:
  kind: ClusterRole
  name: cluster-admin
  apiGroup: rbac.authorization.k8s.io

Without being an expert, I suspect it is because of the "ClusterRoleBinding". I have tried to find out more about this, but to no avail.

If you need more background information, you can find it here:

Tutorial after I proceeded

git-Repo from which the sp-authentication.yaml is

If you need more info, feel free to contact me! Thank you!

-- LePyka
amazon-eks
amazon-web-services
kubernetes
shinyproxy

0 Answers