This tutorial demonstrates building and deploying a complete full-stack application using modern DevOps practices and cloud-native technologies. It covers the entire journey from local development to production deployment on Google Kubernetes Engine (GKE).
┌─────────────────────────────────────────────────────────────┐
│ Complete Architecture │
├─────────────────────────────────────────────────────────────┤
│ Frontend (Vue 3) Backend (Go) Database (PostgreSQL)│
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ • Vue 3 │────▶│ • REST API │───▶│ • PostgreSQL│ │
│ │ • TypeScript│ │ • GraphQL │ │ • Cloud SQL │ │
│ │ • Vite │ │ • Gin │ │ • Backups │ │
│ │ • Nginx │ │ • GORM │ └─────────────┘ │
│ └─────────────┘ └─────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Docker Containers │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Kubernetes Orchestration │ │
│ │ • Kind (Local) • GKE (Production) • Helm Charts │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ CI/CD Pipeline │ │
│ │ • GitHub Actions • Terraform • Security Scanning │ │
│ └─────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
- Vue 3 with Composition API and TypeScript
- Vite for fast development and building
- Vue Router for client-side routing
- Pinia for state management
- Axios for REST API calls
- Apollo Client for GraphQL integration
- Go 1.21 with modern practices
- Gin web framework for HTTP handling
- GORM for database operations
- GraphQL-Go for GraphQL API
- PostgreSQL for data persistence
- Docker for containerization
- Kubernetes for orchestration
- Helm for package management
- Terraform for infrastructure as code
- Google Cloud Platform for production hosting
- GitHub Actions for CI/CD
- Kind for local Kubernetes testing
- Google Container Registry for image storage
- Cloud SQL for managed database
- Monitoring and observability tools
├── frontend/ # Vue 3 application
│ ├── src/
│ │ ├── views/ # Page components
│ │ ├── components/ # Reusable components
│ │ ├── App.vue # Root component
│ │ └── main.ts # Entry point
│ ├── package.json # Dependencies
│ └── vite.config.ts # Build configuration
│
├── backend/ # Go API server
│ ├── internal/
│ │ ├── api/ # REST and GraphQL handlers
│ │ ├── config/ # Configuration management
│ │ ├── database/ # Database connection
│ │ └── models/ # Data models
│ ├── go.mod # Go dependencies
│ └── main.go # Application entry point
│
├── docker/ # Docker configurations
│ ├── Dockerfile.frontend # Frontend container
│ ├── Dockerfile.backend # Backend container
│ └── nginx.conf # Nginx configuration
│
├── helm/ # Helm charts
│ └── tutorial-app/
│ ├── Chart.yaml # Chart metadata
│ ├── values*.yaml # Environment configurations
│ └── templates/ # Kubernetes manifests
│
├── terraform/ # Infrastructure as code
│ ├── main.tf # Main configuration
│ ├── variables.tf # Input variables
│ └── outputs.tf # Output values
│
├── .github/ # GitHub Actions workflows
│ └── workflows/
│ ├── ci-cd.yml # Main CI/CD pipeline
│ └── security-scan.yml # Security scanning
│
├── k8s/ # Kubernetes manifests
├── scripts/ # Utility scripts
├── docs/ # Documentation
└── Makefile # Development commands
- Docker Desktop
- Node.js 18+
- Go 1.21+
- kubectl
- helm
- kind
- terraform (for production)
- gcloud CLI (for production)
# 1. Clone and setup
git clone <repository-url>
cd full-stack-k8s-tutorial
make setup
# 2. Start local development
make dev-up
# 3. Deploy to local Kubernetes
make kind-setup
make kind-deploy
# 4. Access the application
# Add to /etc/hosts: 127.0.0.1 tutorial-app.local
# Visit: http://tutorial-app.local- Frontend Development - Build Vue 3 application
- Backend Development - Create Go API with REST and GraphQL
- Database Integration - Connect to PostgreSQL
- Local Testing - Run with Docker Compose
- Docker Images - Create optimized containers
- Multi-stage Builds - Optimize for production
- Container Registry - Push to Google Container Registry
- Security Scanning - Vulnerability assessment
- Local Kubernetes - Deploy with Kind
- Helm Charts - Package management
- Service Discovery - Internal communication
- Ingress Configuration - External access
- Terraform Setup - Infrastructure as code
- GKE Cluster - Production Kubernetes
- Cloud SQL - Managed database
- Networking - VPC and security
- GitHub Actions - Automated workflows
- Testing Pipeline - Quality gates
- Security Scanning - Vulnerability checks
- Deployment Automation - Staging and production
- Monitoring - Observability setup
- Logging - Centralized log management
- Alerting - Incident response
- Backup & Recovery - Data protection
After completing this tutorial, you will understand:
- Modern frontend development with Vue 3
- Backend API development with Go
- Database design and operations
- RESTful and GraphQL API design
- Container orchestration with Kubernetes
- Infrastructure as code with Terraform
- CI/CD pipeline design and implementation
- Security best practices
- Google Cloud Platform services
- Managed Kubernetes (GKE)
- Cloud databases and networking
- Cost optimization strategies
- Monitoring and observability
- Incident response procedures
- Backup and disaster recovery
- Performance optimization
- User management with CRUD operations
- Dual API support (REST and GraphQL)
- Real-time data updates
- Responsive web interface
- Health checks and monitoring endpoints
- High availability deployment
- Auto-scaling capabilities
- Load balancing and traffic routing
- SSL/TLS termination
- Database connection pooling
- Network policies and segmentation
- Pod security standards
- Secrets management
- Vulnerability scanning
- Audit logging
- Blue-green deployments
- Rolling updates
- Automated backups
- Monitoring and alerting
- Log aggregation
- Availability: 99.9% uptime
- Response Time: < 200ms for 95% of requests
- Throughput: Handle 1000+ requests per second
- Error Rate: < 0.1% of total requests
- Deployment Time: < 5 minutes for updates
- Recovery Time: < 15 minutes for incidents
- Backup Frequency: Daily automated backups
- Security Scans: Weekly vulnerability assessments
This tutorial is designed to be educational and extensible. Areas for enhancement:
- Additional frontend frameworks (React, Angular)
- Alternative backend languages (Python, Node.js)
- Different cloud providers (AWS, Azure)
- Advanced monitoring solutions
- Service mesh integration
- GitOps workflows
Comprehensive documentation is available in the docs/ directory:
- Frontend Development
- Backend Development
- Docker Configuration
- Local Kubernetes with Kind
- Helm Charts
- Terraform Infrastructure
- GitHub Actions CI/CD
- Production Deployment
After completing this tutorial, consider exploring:
- Service Mesh: Istio or Linkerd integration
- GitOps: ArgoCD or Flux deployment
- Observability: Prometheus, Grafana, Jaeger
- Security: Falco, OPA Gatekeeper
- Multi-cloud: Deployment across providers
- Edge Computing: CDN and edge deployment
This tutorial provides a solid foundation for modern cloud-native application development and deployment practices.