Deployed the Shinobi CCTV application on a Kubernetes cluster with a connected MySQL database. The setup includes NFS-backed PersistentVolumes for the application, database, and livestreams — each with 5GB allocated — along with Kubernetes Secrets for credential management and full post-deployment configuration.
The deployment consists of:
- NFS PersistentVolumes for Shinobi app data, MySQL data, and livestream storage (5GB each)
- PersistentVolumeClaims bound to each PV
- Kubernetes Secret storing Shinobi application credentials
- MySQL Deployment + ClusterIP Service
- Shinobi Deployment + Service
- Post-deployment configuration via exec into the Shinobi pod
| Layer | Technology |
|---|---|
| Container orchestration | Kubernetes |
| Application | Shinobi CCTV |
| Database | MySQL |
| Storage | NFS PersistentVolumes (5GB each) |
| Credential management | Kubernetes Secrets |
| Networking | Kubernetes Services (ClusterIP) |
1. NFS PersistentVolumes
- Created 3 PVs using NFS as the storage backend — one each for Shinobi app data, MySQL data, and Shinobi livestreams
- Each volume allocated 5GB storage capacity
2. PersistentVolumeClaims
- Deployed PVCs for Shinobi, MySQL, and Streams
- Each PVC bound to its corresponding NFS PV
3. Kubernetes Secret
- Stored Shinobi application credentials securely as a Kubernetes Secret
- Referenced in the Shinobi Deployment via
secretKeyRef
4. MySQL Deployment + Service
- Deployed MySQL with the PVC mounted for data persistence
- Exposed internally via ClusterIP Service
5. Shinobi Deployment + Service
- Deployed Shinobi CCTV application with PVCs mounted for app data and livestreams
- Connected to MySQL via environment variables
- Exposed via Kubernetes Service
6. Post-deployment configuration
- Exec'd into the Shinobi pod to complete application prerequisites
- See
instructions.txtfor the full setup steps
03-shinobiApplication-DEVOPS/
├── secret.yaml (Shinobi credentials)
├── deployments-services.yaml (MySQL + Shinobi Deployments + Services)
├── persistent-volumes.yaml (PV's for MySQL + Shinobi)
├── persistent-volume-claims.yaml (PVC's for MySQL + Shinobi logs/streams)
└── README.md
After deploying all manifests, exec into the Shinobi pod to complete configuration:
kubectl exec -it <shinobi-pod-name> -- /bin/bashRefer to instructions.txt in this repo for the full list of commands to run inside the pod.
- Configuring NFS-backed PersistentVolumes in Kubernetes for stateful applications
- Managing multiple PVCs for different storage concerns within the same application
- Connecting a CCTV application to a MySQL backend via Kubernetes-native networking
- Post-deployment configuration via
kubectl execfor applications that require runtime setup
