How to Scan Kubernetes Resources Using Kubescape

What is Kubescape?

How to Scan Kubernetes Cluster Using Kubescape

# kubescape -h
# kubescape scan -h
  • --submit: This flag sends the scan results to the Armo management portal.
  • --enable-host-scan: This flag deploys the ARMO K8s host-sensor DaemonSet that collects valuable and unlimited information from your host machine about your cluster.
  • --verbose: This flag displays all the resources scanned.
# kubescape scan --submit --enable-host-scan --format-version v2 --verbose

How to Analyze Kubescape Scan Results

  • Threat severity: This field measures how critical the threat is. There are three levels of a threat, which are: High, Medium, and Low.
  • Control Name: This field states the name of the component or aspect being analyzed.
  • Docs: This field contains the link that redirects you to a page that contains information about the risk and threat detected during the scan.
  • Assistant remediation: This field contains changes that can be made to your YAML file or cluster to eliminate the threat.
# kubescape scan --format pdf --output results.pdf
# kubescape scan framework nsa
# kubescape scan nsa --format pdf --output nsa.pdf
# kubescape scan control "Privileged container"
# kubescape scan control "Privileged container" --format pdf --output container.pdf
# kubescape scan framework mitre –submit
# kubescape scan framework mitre --format pdf --output mitre.pdf
# kubescape scan --include-namespaces staging,production
# kubescape scan --include-namespaces staging,production --format pdf --output preprod.pdf
# kubescape scan --exclude-namespaces kube-system,kube-public
# kubescape scan --exclude-namespaces kube-system,kube-public --format pdf --output teamnamespace.pdf

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
FoxuTech

FoxuTech

62 Followers

Discuss about #Linux, #DevOps, #Docker, #kubernetes, #HowTo’s, #cloud & IT technologies like #argocd #crossplane #azure https://foxutech.com/