Skip to main content

Step 1: Get the Sample Chart and Test

To begin, get the sample Gitea Helm chart from Bitnami, install the chart in your cluster using the Helm CLI, and then uninstall. The purpose of this step is to confirm that you can successfully install the application before adding preflight checks to the chart.

To get the sample Gitea Helm chart and test installation:

  1. Run the following command to pull and untar version 1.0.6 of the Bitnami Gitea Helm chart:

    helm pull --untar oci://registry-1.docker.io/bitnamicharts/gitea --version 1.0.6

    For more information about this chart, see the bitnami/gitea repository in GitHub.

  2. Change to the new gitea directory that was created:

    cd gitea
  3. View the files in the directory:

    ls

    The directory contains the following files:

    Chart.lock  Chart.yaml  README.md  charts  templates  values.yaml
  4. Install the Gitea chart in your cluster:

    helm install gitea . --namespace gitea --create-namespace

    To view the full installation instructions from Bitnami, see Installing the Chart in the bitnami/gitea repository.

    When the chart is installed, the following output is displayed:

    NAME: gitea
    LAST DEPLOYED: Tue Oct 24 12:44:55 2023
    NAMESPACE: gitea
    STATUS: deployed
    REVISION: 1
    TEST SUITE: None
    NOTES:
    CHART NAME: gitea
    CHART VERSION: 1.0.6
    APP VERSION: 1.20.5

    ** Please be patient while the chart is being deployed **

    1. Get the Gitea URL:

    NOTE: It may take a few minutes for the LoadBalancer IP to be available.
    Watch the status with: 'kubectl get svc --namespace gitea -w gitea'

    export SERVICE_IP=$(kubectl get svc --namespace gitea gitea --template "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}")
    echo "Gitea URL: http://$SERVICE_IP/"

    WARNING: You did not specify a Root URL for Gitea. The rendered URLs in Gitea may not show correctly. In order to set a root URL use the rootURL value.

    2. Get your Gitea login credentials by running:

    echo Username: bn_user
    echo Password: $(kubectl get secret --namespace gitea gitea -o jsonpath="{.data.admin-password}" | base64 -d)
  5. Watch the gitea LoadBalancer service until an external IP is available:

    kubectl get svc gitea --namespace gitea --watch
  6. When the external IP for the gitea LoadBalancer service is available, run the commands provided in the output of the installation command to get the Gitea URL:

    export SERVICE_IP=$(kubectl get svc --namespace gitea gitea --template "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}")
    echo "Gitea URL: http://$SERVICE_IP/"
    note

    Alternatively, you can run the following command to forward a local port to a port on the Gitea Pod:

    POD_NAME=$(kubectl get pods -l app.kubernetes.io/name=gitea -o jsonpath='{.items[0].metadata.name}')
    kubectl port-forward pod/$POD_NAME 8080:3000
  7. In a browser, go to the Gitea URL to confirm that you can see the welcome page for the application:

    Gitea application webpage

    View a larger version of this image

  8. Uninstall the Helm chart:

    helm uninstall gitea --namespace gitea

    This command removes all the Kubernetes components associated with the chart and uninstalls the gitea release.

  9. Delete the namespace:

    kubectl delete namespace gitea

Next Step

Define preflight checks and add them to the Gitea Helm chart. See Add a Preflight Spec to the Chart.