Requirements for Existing Kubernetes Clusters¶
Overview¶
This guide outlines the requirements for using Kube CINC Secure Scanner with your existing Kubernetes cluster. Whether you're running a managed Kubernetes service like EKS, GKE, or AKS, or a self-managed cluster, these requirements ensure successful scanning operations.
Kubernetes Version Requirements¶
The minimum Kubernetes version required depends on the scanning approach you plan to use:
Scanning Approach | Minimum Kubernetes Version | Notes |
---|---|---|
Standard Container (Kubernetes API) | v1.16+ | Uses standard kubectl exec functionality |
Sidecar Container | v1.17+ | Requires shared process namespace support |
Debug Container (for distroless) | v1.23+ | Requires ephemeral containers feature |
For maximum compatibility and security, we recommend using Kubernetes v1.23 or newer.
Feature Gates and API Extensions¶
Depending on your scanning approach, certain Kubernetes feature gates must be enabled:
For Standard Container Scanning¶
The standard container scanning approach uses the train-k8s-container transport plugin, which requires:
kubectl exec
functionality- Core API endpoints for pods and pod execution
No special feature gates are required for this approach.
For Sidecar Container Scanning¶
The sidecar container approach requires:
shareProcessNamespace: true
functionality (standard in K8s 1.17+)- No additional feature gates required
For Debug Container Scanning (Distroless)¶
The debug container approach uses ephemeral containers and requires:
- EphemeralContainers feature gate (standard in K8s 1.23+)
pods/ephemeralcontainers
API endpoint enabledkubectl debug
command support
On older clusters, you may need to explicitly enable the EphemeralContainers feature gate:
RBAC Requirements¶
Your cluster must support Role-Based Access Control (RBAC), and you must have permissions to:
- Create service accounts
- Create roles and role bindings
- Create pods (for sidecar approach)
- Execute commands in pods
- Create ephemeral containers (for debug container approach)
The minimum RBAC permissions needed for scanning are:
For distroless container scanning, add:
Networking Requirements¶
The scanning process requires network access from:
- Where you run the scanning scripts to the Kubernetes API server
- The Kubernetes API server to your pod network
- For CI/CD integrations, your CI/CD pipeline to the Kubernetes API server
If you use network policies or other security controls, ensure they allow:
- Outbound traffic from scanner pods to Kubernetes API (typically port 443/TCP)
- Inbound traffic to your pods on the pod network
Resource Requirements¶
Scanning operations have minimal resource requirements, but ensure your cluster has:
- Available CPU and memory for scanner pods (typically 100m CPU, 256Mi memory)
- API server capacity to handle additional API requests
- For distroless scanning, capacity to run ephemeral debug containers
Validating Your Cluster Compatibility¶
Run this validation script to check if your cluster meets the requirements:
If the script isn't available, you can manually verify:
Special Considerations for Managed Kubernetes Services¶
Amazon EKS¶
- Ensure your IAM roles have sufficient permissions
- For distroless scanning, use EKS 1.23 or newer
- Consider using EKS managed node groups for easier upgrades
Google GKE¶
- Standard GKE should work with all approaches
- For distroless scanning on older clusters, enable the EphemeralContainers feature gate
- If using Workload Identity, ensure proper service account mapping
Microsoft AKS¶
- Use AKS 1.23+ for all scanning approaches
- If using Azure AD integration, ensure your user/service principal has sufficient permissions
- Consider using Azure RBAC for Kubernetes authorization
Security Considerations¶
When configuring your cluster for scanning, follow these security best practices:
- Create a dedicated namespace for scanning operations
- Use service accounts with minimal permissions
- Generate short-lived tokens for authentication
- Consider using network policies to isolate scanner pods
- Monitor API server audit logs for scanning operations
- Use namespaced resources instead of cluster-wide resources when possible
Next Steps¶
After confirming your cluster meets the requirements:
- Configure RBAC for scanning
- Set up service accounts
- Generate secure kubeconfig files
- Run your first container scan