Skip to content
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

Aqua Security on Aws ubuntu Kubernetes cluster #98

Closed
vamsi1122 opened this issue Feb 26, 2018 · 16 comments
Closed

Aqua Security on Aws ubuntu Kubernetes cluster #98

vamsi1122 opened this issue Feb 26, 2018 · 16 comments

Comments

@vamsi1122
Copy link

Hello, I have created a kubernetes cluster using AWS Ubuntu, and i've run the aquasecurity kube bench to run the security check but i'm getting an error "need apiserver executable but none of the candidates are running". Can you please guide me on how to resolve the issue.

@ttousai
Copy link
Contributor

ttousai commented Feb 26, 2018

Hello @vamsi1122 are you running kube-bench on a master node?

This error means that kube-bench could not detect a running kube-apiserver process. Please check the apiserver process is running on your node.

@vamsi1122
Copy link
Author

I’m running in on the host machine and yes I’m checking for the master node. I’ve checked on multiple resources but couldn’t find how to check if api process is running ?

@ttousai
Copy link
Contributor

ttousai commented Feb 26, 2018

@vamsi1122 how did you install kubernetes? It may be that our current implementation of kube-bench is not able to detect apiserver installed using that approach.

Also have you tried ps -ef | grep apiserver? It might show something interesting.

@vamsi1122
Copy link
Author

vamsi1122 commented Feb 26, 2018

I installed using Kops method.

@ttousai
Copy link
Contributor

ttousai commented Feb 28, 2018

@vamsi1122 can you share what output you got for ps -ef | grep apiserver please.

@jacobfoard
Copy link

Also having issues running on nodes, but that seems to be because they don't include kubectl on the nodes.

To answer the above question:

$ ps -ef | grep apiserver
admin     4970  2342  0 21:47 pts/0    00:00:00 grep apiserver

My error however is:

$ ./kube-bench node

kubernetes version check failed: exec: "kubectl": executable file not found in $PATH

Any thoughts, or is kubectl necessary to be on the nodes for the tool to work?

@vamsi1122
Copy link
Author

vamsi1122 commented Mar 6, 2018

I had the similar error. You need to install kubectl on the nodes aswell.

Kubectl:

•	 curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
•	chmod +x ./kubectl
•	sudo mv ./kubectl /usr/local/bin/kubectl

@jacobfoard
Copy link

Installing kubectl fixed my issue. I wish it came preinstalled, but that an issue for the kops team.

@lizrice
Copy link
Contributor

lizrice commented Apr 4, 2018

We've just made a change so that if kubectl isn't installed, the version will be obtained from kubelet. I think this should solve this issue - would be great if you could confirm whether this works for you @vamsi1122 @jacobfoard

@vamsi1122
Copy link
Author

@lizrice I would like to run the Kube-Bench towards Openshift Container Platform. Do you see any possibility anytime soon?

@jacobfoard
Copy link

@lizrice I have confirmed this is working on my kops 1.8 cluster with out kubectl

@lizrice
Copy link
Contributor

lizrice commented Apr 14, 2018

Thanks @jacobfoard.

@vamsi1122 Regarding OpenShift, yes this is something we want to add support for - you might want to follow issue #23 (and we recently spoke to some folks from RedHat about this so hoping to make progress fairly soon)

@lizrice lizrice closed this as completed Apr 14, 2018
@sanjeevrg89
Copy link

@lizrice kubectl logs kube-bench-node-xxxx
need proxy executable but none of the candidates are running

I am trying to run kube-bench on worker node (Virtual Machine Scale Set on Azure)
I am able to run kubectl commands from the worker node but I still see the above error.
Any help will be appreciated

@vamsi1122
Copy link
Author

vamsi1122 commented Jul 19, 2019 via email

@sanjeevrg89
Copy link

@vamsi1122 I am running it as root

@vamsi1122
Copy link
Author

vamsi1122 commented Jul 22, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants