{"id":31825730,"url":"https://github.com/piyushsachdeva/portainer-config","last_synced_at":"2026-08-03T08:31:17.182Z","repository":{"id":313556498,"uuid":"1051080984","full_name":"piyushsachdeva/portainer-config","owner":"piyushsachdeva","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-21T10:41:26.000Z","size":438,"stargazers_count":0,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-18T18:58:51.619Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piyushsachdeva.png","metadata":{"files":{"readme":"README-GITOPS.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-05T12:13:18.000Z","updated_at":"2025-09-21T10:41:29.000Z","dependencies_parsed_at":"2025-09-16T19:51:34.588Z","dependency_job_id":"6276dca7-0640-4845-97a9-eb6f7b122b37","html_url":"https://github.com/piyushsachdeva/portainer-config","commit_stats":null,"previous_names":["itsbaivab/portainer-config","piyushsachdeva/portainer-config"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/piyushsachdeva/portainer-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyushsachdeva%2Fportainer-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyushsachdeva%2Fportainer-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyushsachdeva%2Fportainer-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyushsachdeva%2Fportainer-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piyushsachdeva","download_url":"https://codeload.github.com/piyushsachdeva/portainer-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyushsachdeva%2Fportainer-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36228519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-08-03T02:00:06.975Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-11T16:22:20.412Z","updated_at":"2026-08-03T08:31:17.173Z","avatar_url":"https://github.com/piyushsachdeva.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Complete AKS GitOps Deployment with Portainer\n\nThis comprehensive guide covers deploying the URL Shortener microservices application on **Azure Kubernetes Service (AKS)** using **GitOps** principles with **Portainer** for visual management.\n\n## 🚀 **AKS Cluster Setup**\n\n### **1. Prerequisites**\n\n```bash\n# Install required tools\naz --version          # Azure CLI\nkubectl version       # Kubernetes CLI\nhelm version          # Helm package manager (optional)\n```\n\n### **2. Create AKS Cluster**\n\n```bash\n# Set variables\nexport RESOURCE_GROUP=\"url-shortener-rg\"\nexport CLUSTER_NAME=\"url-shortener-aks\"\nexport LOCATION=\"eastus\"\n\n# Create resource group\naz group create --name $RESOURCE_GROUP --location $LOCATION\n\n# Create AKS cluster with auto-scaling\naz aks create \\\n  --resource-group $RESOURCE_GROUP \\\n  --name $CLUSTER_NAME \\\n  --node-count 3 \\\n  --enable-addons monitoring \\\n  --enable-cluster-autoscaler \\\n  --min-count 1 \\\n  --max-count 10 \\\n  --node-vm-size Standard_B2s \\\n  --generate-ssh-keys\n\n# Get AKS credentials\naz aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME\n\n# Verify cluster connection\nkubectl cluster-info\nkubectl get nodes\n```\n\n### **3. Deploy Portainer on AKS**\n\n```bash\n# Create Portainer namespace\nkubectl create namespace portainer\n\n# Deploy Portainer with LoadBalancer service\nkubectl apply -n portainer -f https://downloads.portainer.io/ce-lts/portainer-lb.yaml\n\n# Check Portainer deployment\nkubectl get pods -n portainer\nkubectl get svc -n portainer\n\n# Get Portainer external IP (wait for LoadBalancer provisioning)\nkubectl get svc portainer -n portainer -w\n```\n\n### **4. Access Portainer Dashboard**\n\n```bash\n# Get external IP\nPORTAINER_IP=$(kubectl get svc portainer -n portainer -o jsonpath='{.status.loadBalancer.ingress[0].ip}')\necho \"Portainer URL: http://$PORTAINER_IP:9000\"\n\n# Open in browser\necho \"Initial setup: Create admin user at http://$PORTAINER_IP:9000\"\n```\nOnce logged in, enter you license key to get you 3 node cluster free license that you recived in you gmail.\n\n```bash\nexample key looks like this \n3-4YcvT0KJoyYuq+V24d3ldVvMoEpqoX2ThprHbTdsokfPxeKgxQ/5u9mMrqrbxE76MFjORQ2FK2FT8ggwlXNzeEj+TCJ65WRsdfpadf1Y=\n\n```\nCongatulations! You now have Portainer running on AKS.\n\n## 📁 **File Structure Overview**\n\nThis directory contains all Kubernetes manifests organized by deployment order:\n\n```\nk8s/gitopsportainer/\n├── 00-namespace.yaml              # Creates url-shortener namespace\n├── 00-secrets.yaml                # Database credentials and app secrets\n├── 01-postgres-config.yaml        # PostgreSQL initialization SQL\n├── 02-postgres.yaml               # PostgreSQL StatefulSet with persistent storage\n├── 03-link-service.yaml           # Link generation microservice\n├── 04-redirect-service.yaml       # URL redirection microservice\n├── 05-stats-service.yaml          # Analytics and statistics microservice\n├── 07-frontend.yaml               # Frontend web application with nginx\n├── deploy.sh                      # Automated deployment script\n├── ingress-controller.yaml        # NGINX Ingress Controller installation\n├── simple-ingress.yaml            # Basic ingress configuration\n├── kustomization.yaml             # Kustomize configuration file\n└── README-GITOPS.md              # This comprehensive guide\n```\n\n## 🚀 **Deployment Instructions**\n\n### **Option 1: Automated Deployment **\n\n```bash\n# Navigate to GitOps directory\ncd k8s/gitopsportainer/\n\n# Run automated deployment script\n./deploy.sh\n\n# Monitor deployment progress\nkubectl get pods -n url-shortener -w\n```\n\n\n\n```bash\n# 1. Create namespace and secrets\nkubectl apply -f 00-namespace.yaml\nkubectl apply -f 00-secrets.yaml\n\n# 2. Deploy PostgreSQL database\nkubectl apply -f 01-postgres-config.yaml\nkubectl apply -f 02-postgres.yaml\n\n# Wait for PostgreSQL to be ready\nkubectl wait --for=condition=ready pod/postgres-0 -n url-shortener --timeout=300s\n\n# 3. Deploy microservices\nkubectl apply -f 03-link-service.yaml\nkubectl apply -f 04-redirect-service.yaml\nkubectl apply -f 05-stats-service.yaml\n\n# 4. Deploy frontend\nkubectl apply -f 07-frontend.yaml\n\n# 5. Optional: Deploy ingress\nkubectl apply -f ingress-controller.yaml\nkubectl apply -f simple-ingress.yaml\n```\n\n```bash\n# Deploy everything with kustomize\nkubectl apply -k .\n\n# Check deployment status\nkubectl get all -n url-shortener\n```\n\n## 🖼️ Assets for Portainer\n\nCurrent images included:\n\n![Deployment screenshot](assests/1.jpeg)\n*deployment or UI screenshot*\n\n![Architecture diagram](assests/2.jpeg)\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiyushsachdeva%2Fportainer-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiyushsachdeva%2Fportainer-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiyushsachdeva%2Fportainer-config/lists"}