-
Notifications
You must be signed in to change notification settings - Fork 113
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
Added RBAC policies for deployment #12
base: master
Are you sure you want to change the base?
Conversation
@kayrus Thanks for making EFK work on k8s :) |
rbac/es-client-rb.yaml
Outdated
subjects: | ||
- kind: ServiceAccount | ||
name: es-client | ||
namespace: logging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Namespace logging
or monitoring
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry. forgot to remove the namespace directive
@@ -47,4 +47,7 @@ eval "${KUBECTL} create configmap es-config --from-file=es-config --dry-run -o y | |||
eval "${KUBECTL} create configmap fluentd-config --from-file=docker/fluentd/td-agent.conf --dry-run -o yaml" | eval "${KUBECTL} apply -f -" | |||
eval "${KUBECTL} create configmap kibana-config --from-file=kibana.yml --dry-run -o yaml" | eval "${KUBECTL} apply -f -" | |||
|
|||
## Install RBAC policies | |||
eval "${KUBECTL} apply -f rbac" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the same for es5/deploy.sh?
I.e. create a ../rbac
symlink and add eval "${KUBECTL} apply -f rbac"
I have plans to merge es5 and es2.x, but it still requires more testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I also took the liberty to update the undeploy.sh
scripts and add the serviceAccount directive to the manifests which I missed out earlier.
Btw, the RBAC manifests were meant for ES2. ES5 is missing the k8s-events-printer.yaml
and es-fluentd-ds.yaml
manifests present in ES2. Is the ES5 deployment ready for use? I tried it a few weeks back but it didn't run properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES5 is ready to be used, but there is no proper webui yet.
I use it with kibana5 and x-pack so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. i'll test it again soon. for now, the rbac rules may not work properly with ES5
@eugene-chow didn't you miss a role for es-master? |
I built the RBAC rules based on the error messages. |
@eugene-chow how many masters do you have? |
3 masters |
They definitely have to communicate to api-server. How do they do this without rbac? Or did I miss something? |
Let me check tomorrow. It might be spitting out errors.
… On 24 Apr 2017, at 23:30, kayrus ***@***.***> wrote:
They definitely have to communicate to api-server. How do they do this without rbac? Or did I miss something?
Sorry, I don't have a test cluster with RBAC right now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#12 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AJjUqCo3femAjJCSzdw5IYYmdcricIgZks5rzL_4gaJpZM4NFofX>.
|
|
@kayrus what's your advice? |
Not really. I have to test this feature myself and if it's ok - I'll merge it. |
Sorry for the delay. I have a question, why did you remove namespaces from the manifests? eugene-chow@1d4d8e0 kubectl complains on namespace:
You have to define them for |
Namespace assignment is in the deploy.sh script so there's no need to specify it in the manifest. A ClusterRoleBinding applies a Role/ClusterRole to the whole cluster. Specifying the namespace has no effect. I'm not certain why |
@eugene-chow which kubernetes version do you use? I tested on 1.6.4. |
I last tested it on 1.5.4. i do have a 1.6.4 cluster but I haven’t yet attempted to deploy ELK. the RBAC should be exactly the same if not similar.
… On 19 Jun 2017, at 17:19, kayrus ***@***.***> wrote:
@eugene-chow <https://github.com/eugene-chow> which kubernetes version do you use? I tested on 1.6.4.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#12 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AJjUqPOHMa5FYWkxLiHjG1HQYmqacjLeks5sFj0FgaJpZM4NFofX>.
|
@eugene-chow I assume |
Now that you mention it, I recall that the namespace is needed when you tie the ClusterRole to a ServiceAccount in the ClusterRoleBinding.
… On 19 Jun 2017, at 17:32, kayrus ***@***.***> wrote:
@eugene-chow <https://github.com/eugene-chow> I assume ClusterRoleBinding requires the namespace definition even when you use --namespace %namespace% parameter for kubedns, since you have to specify which service account and from which namespace should be used.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#12 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AJjUqE03XHbnLC-yOAWRnDBroReMuT7eks5sFkBGgaJpZM4NFofX>.
|
It's also worth to introduce podsecuritypolicy for this. I have some kind of draft, maybe you can introduce it in this PR:
|
No description provided.