Push code
Let’s initiate git repo in cloud shell, add Readme file and push code to our private Gitea server:
git init echo "Hello from Gitea Repo!" > README.md git add README.md git commit -m "first commit" git remote add origin http://20.126.230.2:3000/gitea_admin/FirstRepo.git git push -u origin master
Now we can see the first commit on the remote server!
Clean up:
To clean up, you need to delete the helm chart
helm delete gitea
and delete resource group with AKS cluster and worker node
az group delete --name my-gitea-lab --yes --no-wait
In this article, we covered steps to install Azure Kubernetes Service (AKS) with az CLI, customized and installed Gitea helm chart, exposed Gitea with Load Balancer. Then we created a git repository and pushed code to the Gitea server.
Installing Private Git Server on K8s Cluster with Gitea and AKS
In this article, we are going to install a self-hosted Gitea server on top of Azure Kubernetes Service with Helm and set up a git repo. Having a private Git server might be beneficial these days.
Gitea is a community-managed Git-compatible lightweight code hosting solution written in Go. It is published under the MIT license.
Azure Kubernetes Service (AKS) is a Microsoft Azure Managed Kubernetes service
In this article, we will set up an AKS cluster using az CLI and cloud shell.
Implementation:
Before creating any resources, we need to verify that Microsoft.OperationsManagement and Microsoft.OperationalInsights are registered on your subscription
az provider show -n Microsoft.OperationsManagement -o table az provider show -n Microsoft.OperationalInsights -o table
If they are not registered, register using the following commands:
az provider register --namespace Microsoft.OperationsManagement az provider register --namespace Microsoft.OperationalInsights
First of all, we need to create a resource group since all azure resources must be in a particular resource group. All resources I’m going to create will be in the West Europe region (westeurope).
az group create --name my-gitea-lab --location westeurope