Setting Up Minikube for Local Evaluation¶
Overview¶
This guide walks you through setting up a local Minikube environment for evaluating and testing the Kube CINC Secure Scanner. Using Minikube provides a controlled, isolated environment to test container scanning functionality without affecting production systems.
Prerequisites¶
- A system with sufficient resources:
- 4+ GB of RAM
- 20+ GB of free disk space
- 2+ CPU cores
- One of the following virtualization platforms:
- Docker (recommended for macOS and Linux)
- VirtualBox (works on all platforms)
- HyperKit (macOS)
- Hyper-V (Windows)
- KVM (Linux)
- Administrative access to install software
Required Software¶
Before beginning the setup, ensure you have the following software installed:
- Minikube: For running a local Kubernetes cluster
- kubectl: For interacting with the Kubernetes cluster
- CINC Auditor: For running compliance scans
- SAF CLI (optional): For processing and validating scan results
Our setup script can install these components automatically with the --install-deps
flag.
Using the Setup Script¶
The project includes a comprehensive setup script that automates the entire Minikube setup process. This is the recommended approach for most users.
Basic Setup¶
This will:
- Check for required dependencies
- Create a 3-node Minikube cluster
- Configure RBAC permissions
- Deploy test pods for scanning
- Generate a kubeconfig file
Advanced Options¶
The script supports several configuration options:
Manual Setup Process¶
If you prefer to set up Minikube manually, follow these steps:
- Start Minikube with Multiple Nodes
- Create a Namespace for Testing
- Create Service Account and RBAC Resources
- Deploy Test Pods
- Generate Kubeconfig
Verifying Your Setup¶
After setup completes, verify that everything is working correctly:
Running Your First Scan¶
Once your environment is set up, run a test scan to verify everything works correctly:
Cleanup¶
When you're done testing, you can clean up the resources:
Troubleshooting¶
Common Issues¶
Issue | Solution |
---|---|
"Unable to start minikube" | Check for sufficient system resources and try a different driver |
"The connection was refused" | Minikube may not be running. Try minikube status and start if needed |
"Error: No such container" | Docker may have restarted. Try minikube delete and start again |
"Permission denied" | Check RBAC permissions and regenerate kubeconfig |
Getting Help¶
If you encounter issues not covered in this guide:
- Run
minikube logs
to check for error messages - Check
kubectl describe pod <pod-name> -n inspec-test
for pod-specific issues - Consult the Minikube documentation
Next Steps¶
After successfully setting up your local environment:
- Run a standard container scan
- Scan distroless containers (if set up with
--with-distroless
) - Configure custom thresholds
- Explore different scanning approaches