Kubernetes Cluster Security - Kube-Hunter
Kubernetes Cluster Security - Kube-Hunter
1. Remediation
a. Disable --enable-debugging-handlers kubelet flag.
When kube-hunter reports a Kubernetes version disclosure vulnerability, it means that the
Kubernetes version information is being exposed, which can be leveraged by attackers to identify
potential vulnerabilities specific to that version.
- --anonymous-auth=false
- --profiling=false
- --request-timeout=1m
These flags help reduce the risk by disabling unauthenticated access and profiling, which
might expose version information.
server {
listen 443 ssl;
server_name k8s-api.example.com;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
location / {
proxy_pass https://kubernetes.default.svc.cluster.local;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_hide_header Kubernetes-Version;
proxy_hide_header Server;
add_header X-Content-Type-Options nosniff;
}
}