Installation
Table of contents
- Helm Installation
- Configuration
- CLI Installation
- RBAC Details
- High Availability
- Certificate Management
- Uninstallation
- Troubleshooting
Helm Installation
Add the Helm Repository
helm repo add potoo https://potoo.io/charts
helm repo update
Install with Default Settings
helm install potoo potoo/potoo \
-n potoo-system \
--create-namespace
Alternatively, install directly from the OCI registry (Helm 3.8+):
helm install potoo oci://ghcr.io/potooio/charts/potoo \
-n potoo-system \
--create-namespace
This installs:
- Controller with 2 replicas (leader election enabled)
- Admission webhook with 2 replicas
- RBAC with cluster-wide read access
- ServiceAccount with necessary permissions
Verify Installation
# Check pods are running
kubectl get pods -n potoo-system
# Check CRDs are installed
kubectl get crd | grep potoo
# View controller logs
kubectl logs -n potoo-system -l app=potoo-controller
Expected CRDs:
constraintreports.potoo.io
constraintprofiles.potoo.io
notificationpolicies.potoo.io
Configuration
Minimal Production Configuration
# values.yaml
controller:
replicas: 2
leaderElect: true
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
admissionWebhook:
enabled: true
replicas: 2
failurePolicy: Ignore # MUST be Ignore for safety
notifications:
kubernetesEvents: true
constraintReports: true
privacy:
defaultDeveloperDetailLevel: summary
remediationContact: "[email protected]"
Install with custom values:
helm install potoo potoo/potoo \
-n potoo-system \
--create-namespace \
-f values.yaml
Enable Slack Notifications
notifications:
slack:
enabled: true
webhookUrl: "https://hooks.slack.com/services/XXX/YYY/ZZZ"
minSeverity: Critical # Only Critical alerts
Enable MCP Server for AI Agents
mcp:
enabled: true
port: 8090
transport: sse
authentication:
method: kubernetes-sa
Enable Hubble Integration (Cilium)
hubble:
enabled: true
relayAddress: hubble-relay.kube-system.svc:4245
CLI Installation
Download Binary
Pre-built binaries are available from GitHub Releases.
Linux (amd64):
curl -sL https://github.com/potooio/potoo/releases/latest/download/potooctl-linux-amd64 -o potoo
chmod +x potoo
sudo mv potoo /usr/local/bin/
Linux (arm64):
curl -sL https://github.com/potooio/potoo/releases/latest/download/potooctl-linux-arm64 -o potoo
chmod +x potoo
sudo mv potoo /usr/local/bin/
macOS (Apple Silicon):
curl -sL https://github.com/potooio/potoo/releases/latest/download/potooctl-darwin-arm64 -o potoo
chmod +x potoo
sudo mv potoo /usr/local/bin/
macOS (Intel):
curl -sL https://github.com/potooio/potoo/releases/latest/download/potooctl-darwin-amd64 -o potoo
chmod +x potoo
sudo mv potoo /usr/local/bin/
Windows (amd64):
Invoke-WebRequest -Uri https://github.com/potooio/potoo/releases/latest/download/potooctl-windows-amd64.exe -OutFile potoo.exe
Move-Item potoo.exe C:\Windows\System32\
Verify checksum (optional, replace platform suffix as needed):
curl -sL https://github.com/potooio/potoo/releases/latest/download/potooctl-linux-amd64.sha256 -o potoo.sha256
sha256sum -c potoo.sha256
Using Go
Requires Go 1.21+.
go install github.com/potooio/potoo/cmd/potooctl@latest
The binary is named potoo. Verify installation:
potoo version
potoo --help
From Source
git clone https://github.com/potooio/potoo.git
cd potoo
make build
mv bin/potoo /usr/local/bin/
kubectl Plugin (Alternative)
The CLI can also be invoked as a kubectl plugin:
# Download binary (Linux amd64)
curl -sL https://github.com/potooio/potoo/releases/latest/download/potoo-sentinel-linux-amd64 -o kubectl-sentinel
chmod +x kubectl-sentinel
sudo mv kubectl-sentinel /usr/local/bin/
# Or via Go (requires Go 1.21+)
# go install github.com/potooio/potoo/cmd/kubectl-sentinel@latest
# Use
kubectl sentinel query -n my-namespace
kubectl sentinel explain -n my-namespace "connection refused"
RBAC Details
Controller ClusterRole
The controller requires broad read access:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: potoo-controller
rules:
# Read all resources to discover policies
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "list", "watch"]
# Write Potoo CRDs
- apiGroups: ["potoo.io"]
resources: ["constraintreports", "constraintreports/status"]
verbs: ["create", "update", "patch", "delete"]
# Create Events on workloads
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "patch"]
Webhook ClusterRole
The admission webhook has minimal permissions:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: potoo-webhook
rules:
# Read Potoo CRDs for constraint lookup
- apiGroups: ["potoo.io"]
resources: ["constraintreports"]
verbs: ["get", "list"]
High Availability
Controller HA
With controller.replicas: 2 and controller.leaderElect: true, one controller is active while the other is standby. Failover is automatic.
Webhook HA
With admissionWebhook.replicas: 2 and admissionWebhook.pdb.enabled: true, the webhook maintains availability during rolling updates.
Pod Disruption Budgets
admissionWebhook:
pdb:
enabled: true
minAvailable: 1
Certificate Management
The admission webhook requires TLS certificates.
Self-Signed (Default)
admissionWebhook:
certManagement: self-signed
Potoo generates certificates automatically and rotates them before expiry.
cert-manager
admissionWebhook:
certManagement: cert-manager
Requires cert-manager installed in the cluster. Potoo creates a Certificate resource.
Uninstallation
# Remove Helm release
helm uninstall potoo -n potoo-system
# Remove CRDs (optional - deletes all ConstraintReports)
kubectl delete crd constraintreports.potoo.io
kubectl delete crd constraintprofiles.potoo.io
kubectl delete crd notificationpolicies.potoo.io
# Remove namespace
kubectl delete namespace potoo-system
Troubleshooting
Controller Not Starting
Check logs:
kubectl logs -n potoo-system -l app=potoo-controller
Common issues:
- RBAC errors: Ensure ClusterRole and ClusterRoleBinding are created
- CRD not found: Run
helm installagain or check Helm hooks
No Constraints Discovered
- Verify adapters are enabled:
kubectl get constraintprofiles - Check controller logs for adapter errors:
kubectl logs -n potoo-system -l app=potoo-controller | grep adapter - Verify policy CRDs exist:
kubectl get crd | grep -E 'networkpolic|gatekeeper|kyverno'
Webhook Not Receiving Events
- Check webhook registration:
kubectl get validatingwebhookconfiguration potoo-webhook - Verify failurePolicy is
Ignore:kubectl get validatingwebhookconfiguration potoo-webhook -o yaml | grep failurePolicy - Check webhook pod logs:
kubectl logs -n potoo-system -l app=potoo-webhook