Examples
This document provides practical examples for using VirtRigaud with the Remote provider architecture.
Quick Start Examples
All VirtRigaud providers now run as Remote providers. Here are the essential examples to get started:
Basic Provider Setup
- vSphere Provider - Basic vSphere provider configuration
- LibVirt Provider - Basic LibVirt provider configuration
Complete Working Examples
- Complete vSphere Setup - End-to-end vSphere VM creation
- Advanced vSphere Setup - Production-ready vSphere configuration
- LibVirt Complete Setup - End-to-end LibVirt VM creation
- Multi-Provider Setup - Using multiple providers together
Individual Resource Examples
- VMClass - VM resource allocation template
- VMImage - VM image/template definition
- VMNetworkAttachment - Network configuration
- Simple VM - Basic virtual machine
Advanced Examples
- Security Configuration - RBAC, network policies, external secrets
- Advanced Operations - Snapshots, reconfiguration, lifecycle management
Example Directory Structure
docs/examples/
├── provider-*.yaml # Provider configurations
├── complete-example.yaml # Full working setup
├── *-advanced-example.yaml # Production configurations
├── vm*.yaml # Individual resource definitions
├── advanced/ # Advanced operations
├── security/ # Security configurations
└── secrets/ # Credential examples
Key Changes from Previous Versions
Remote-Only Architecture
All providers now run as separate pods with the Remote runtime:
apiVersion: infra.virtrigaud.io/v1beta1
kind: Provider
metadata:
name: my-provider
spec:
type: vsphere # or libvirt, proxmox
endpoint: https://vcenter.example.com
credentialSecretRef:
name: provider-creds
runtime:
mode: Remote # Required - only mode supported
image: "ghcr.io/projectbeskar/virtrigaud/provider-vsphere:v0.2.3"
service:
port: 9090
Current API Schema (v0.2.3)
- VMClass: Standard Kubernetes resource quantities (
cpus: 4,memory: "4Gi") - VMImage: Provider-specific source configurations
- VMNetworkAttachment: Network provider abstractions
- VirtualMachine: Declarative power state management
Configuration Management
Providers receive configuration through:
- Endpoint: Environment variable
PROVIDER_ENDPOINT - Credentials: Mounted secret files in
/etc/virtrigaud/credentials/ - Runtime: Managed automatically by the provider controller
Getting Started
- Choose your provider from the basic examples above
- Create credentials secret (see
examples/secrets/) - Apply provider configuration with required
runtimesection - Define VM resources (VMClass, VMImage, VMNetworkAttachment)
- Create VirtualMachine referencing your resources
For detailed setup instructions, see:
Need Help?
- Check the Remote Providers documentation for architecture details
- Review provider-specific guides for setup instructions
- Look at complete examples for working configurations
- See troubleshooting tips for common issues