How do I scan a Kubernetes (K8s) Cluster?
Use this guide to configure cluster authentication and set up a target in Security Center to start scanning your Kubernetes environment.
Gather cluster details
To ensure you get the proper authentication details, follow the instructions in the Kubernetes authentication guide.
Create a network asset
- Log in to Security Center.
- In the main navigation bar, hover over Assets.
-
From the dropdown menu that appears, select Hosts & network.
- Click button Add hosts/network.
-
Add the IP that is used by the Kubernetes API (e.g, for the API http://174.32.12.45:6443 enter the IP 174.32.12.45 for the network asset.)
Detect internal services
Detect and assess internal services running inside your Kubernetes cluster by adding the internal network of your cluster as an IP network/range asset:
- This IP range needs to be included in the same scan as the API IP in order for the scan to automatically detect and create service assets
Import the Scan profile
- Navigate to Scan Network > Scan profiles.
- Import the profile Kubernetes Scan: standard.
Configure authentication
- Click Edit imported profile and go to the Authentication tab.
- Add a new Kubernetes authentication record.
- Enter the API URL and the Authentication token.
- Run an assesment targeting the cluster API asset, using this profile.
- Done!
Supported scanner appliance versions
Ensure that the Scanner Appliance in use must have at least revision 3.18.0
Understanding the results
Once your Kubernetes scan has completed, you can widen your understanding of the results by reading the information in this article: How do I interpret Kubernetes vulnerabilites?