Installation Guide
This guide covers different installation methods for Nidra Manager, from development setup to production deployment.
Prerequisites
Before installing Nidra Manager, ensure you have:
- Node.js: Version 22 or higher
- pnpm: Package manager (recommended) or npm
- KubeNidra API: Running API server (see API documentation)
Development Setup
1. Clone the Repository
git clone https://github.com/kulbirsaini/kubenidra.git
cd kubenidra/nidra-manager2. Install Dependencies
# Using pnpm (recommended)
pnpm install
# Or using npm
npm install3. Configure Environment
Copy the example environment file and configure your settings:
cp env.example .envEdit .env with your configuration:
# API Configuration
VITE_API_BASE_URL=http://192.168.1.13:18814. Start Development Server
# Using pnpm
pnpm dev
# Or using npm
npm run devThe application will be available at http://localhost:7227
Production Build
1. Build the Application
# Using pnpm
pnpm build
# Or using npm
npm run buildThis creates a production-ready build in the dist/ directory.
2. Serve the Build
You can serve the built application using any static file server:
# Using a simple HTTP server
npx serve dist
# Or using nginx (see nginx.conf in the repository)Docker Deployment
1. Build Docker Image
docker build -t ghcr.io/kulbirsaini/kubenidra-manager:latest .2. Run with Docker Compose
Build image and run the container:
docker-compose up -d --buildOR
Pull the image and run the container
docker-compose up -d3. Using Pre-built Image
docker run -d \
-p 3000:80 \
-e VITE_API_BASE_URL=http://your-api-server:1881 \
ghcr.io/kulbirsaini/kubenidra-manager:latestKubernetes Deployment
Check out the Helm Charts or supplied manager-deployment.yaml for development setup.
Environment Variables
| Variable | Description | Default | Required |
|---|---|---|---|
VITE_API_BASE_URL | KubeNidra API server URL | http://localhost:1881 | Yes |
Configuration
API Configuration
The application needs to connect to the KubeNidra API server. Configure the API endpoint:
VITE_API_BASE_URL=http://your-api-server:1881Theme Configuration
KubeNidra Manager supports both light and dark themes. Users can switch themes in the application, and the preference is stored locally.
Troubleshooting
Common Issues
- API Connection Failed
# Check if API server is running
curl http://your-api-server:1881/api/v1/namespaces
# Verify network connectivity
ping your-api-server- Build Failures
# Clear cache and reinstall dependencies
pnpm clean
pnpm install
pnpm build- Docker Build Issues
# Build with no cache
docker build --no-cache -t ghcr.io/kulbirsaini/kubenidra-manager:latest .- Kubernetes Deployment Issues
# Check pod status
kubectl get pods -n kubenidra
# Check logs
kubectl logs -n kubenidra deployment/kubenidra-managerSecurity Considerations
- HTTPS Only: Always use HTTPS in production
- CORS Configuration: Configure CORS on the API server
- Content Security Policy: Implement CSP headers
- Regular Updates: Keep dependencies updated