-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
How to enable auditing? #4488
Comments
Our documentation isn't great here, but the output is fairly specific about what the problem is in your various attempts. I only checked 3, but:
https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/ has the list of known good apiserver flags. If you don't mind telling me which of the supported apiserver flags you are trying to set, I can help you translate it into the appropriate minikube command-line. |
It's also worth noting that the documentation probably reflects Kubernetes v1.15, so you may want to upgrade to minikube v1.2 first. |
@tstromberg thank you very much for your answer. This is the list of flags I want to enable: The final goal is to enable auditing to run some security checks, for example using JQ filter for audit-events at the beginning and later on Falco for production. |
Try this on:
Two notes:
|
If you find a command that works for you - please share it! |
Great thanks! I will try asap and keep you posted! |
After some tests, I have some findings... These flags seems to be correct:
but I can't be sure because I don't know how to verify and where to find logs... But at least Minikube starts properly. This flag is not correct or the path is not correct:
Output of
I put the attached file (audit-policy.yaml) in the folder @tstromberg what do you think? |
Sorry @tstromberg, any news about this flag? |
For what it's worth, I think you'd have to put the audit-policy.yaml file in a minikube directory that gets mounted by |
For what it's worth, I was able to create a policy file as
|
@brichins thanks for the tip! I will try once back from holidays :) |
@brichins can you share the |
I tested and I can run same as @brichins
But running |
@bygui86 above steps worked fine with the example config from audit doc:
I can see audit logs in apiserver's stdout:
|
Thanks @g-boros!! I will git it a try asap. |
Does someone mind writing this up a tutorial? Depending on how it's written, I'd love to see it added to either https://minikube.sigs.k8s.io/docs/tutorials/ or https://minikube.sigs.k8s.io/docs/reference/ |
@g-boros I tested it as well and it works also on my side! @tstromberg good idea! |
Closing as a workaround was found. @bygui86 - if you write a tutorial, I would be happy to review it for addition to our docs =) |
Re-opening as the issue of this not being documented has not been resolved yet. |
This is a good first issue, to add a tutorial on minikube website, how to enable minikube auditing and maybe add a simple example of audting usage I will be happy to review the PR for it |
This tutorial was assembled from information provided in kubernetes#4488.
Sorry @tstromberg :( too busy to write down the documentation... |
The documentation of @JanAhrens is really good! Precise, concise and clear. |
Thanks @bygui86 and everyone who contributed. I found the steps in this issue very helpful. |
This tutorial was assembled from information provided in kubernetes#4488.
I've tried following the tutorial with the
but I just can't seem to get it to work on my machine. Running
Returns nothing, while the normal logs still keep looking that look like this with no extra loging:
I've also tried to add the Any leads? Do I need to enable some addons or something for this to work? |
It appears that the audit parameters can be set on a fresh install (verified via
😄 minikube v1.15.1 on Darwin 10.15.7 |
The exact command to reproduce the issue:
I tried several extra-config variants:
together with different values:
I tried also:
--feature-gates=Auditing=true
--feature-gates=AdvancedAuditing=true
It does not matter how many CPUs or memory I give, minikube does not start in any case :(
The full output of the command that failed:
Please see all attached files
The output of the
minikube logs
command:No output because minikube does not start.
The operating system version:
MacBook Pro - macOS Mojave 10.14.5
Minikube v1.1.1
I already had a look at the issue #1609, but it doesn't helped :(
I attached all attempts I did.
If someone has ideas or can help it would be great!
Thanks guys!!
attempt-1.log
attempt-2.log
attempt-3.log
attempt-4.log
attempt-5.log
attempt-6.log
attempt-7.log
attempt-8.log
attempt-9.log
attempt-10.log
The text was updated successfully, but these errors were encountered: