PSNC provides Kubernetes cluster resources that can be used in GitLab (gitlab.geant.org) project.
GitLab and Kubernetes (K8s) integration allow users build and run their application as Docker containers in our K8s environment directly from GitLab CI/CD Pipeline. After creating project in GitLab user can request for resources in K8s cluster for development and testing purposes.
- user can run containerized application directly from GitLab CI/CD
- user can control development environment (start/stop application) from GitLab user interface
- application is available under <your-app-name>.ks.qalab.geant.org - <your-app-name> is requested by user
- resources in K8s cluster are reserved for each GitLab project separately - each project have dedicated namespace in K8s cluster
- persistent volumes are available for containers
How to request for K8s resources
- go to https://jira.software.geant.org/servicedesk/customer/portal/2/create/25
- in Application field choose "Gitlab"
- in Summary field type "K8s resources"
- in Description text box provide following information:
- name of your project in GitLab
- name of your application - this become part of URL your application will be accessible: <your-app-name>.k8s.qalab.geant.org
Then we will prepare K8s resources and configure your project to use them.
How to run containers in K8s cluster
- login to https://gitlab.software.geant.org
- got to project K8s Templates (https://gitlab.software.geant.org/gitlab-ci-templates/k8s-templates)
- clone project K8s Templates
- read carefully file .gitlab-ci.yml and copy required code to .gitlab-ci.yml in your repository.
- read carefully file k8s-manifests/k8s.templ.yml and modify it according to your needs (based on comments)
- copy directory k8s-manifests to main directory in your repository
- test CI pipeline
- GitLab CI/CD: https://docs.gitlab.com/ee/ci/
- GitLab Environments and deployments: https://docs.gitlab.com/ee/ci/environments/
QALab vs Gitlab with Kubernates
A graphical comparison of the access layer and architecture of QALab and GitLab+Kubernetes