Skip to content

Golang project CI/CD in gitlab and deploy K8s

Notifications You must be signed in to change notification settings

abbos1711/golang-Gitlab-CI-CD

Repository files navigation

Variables in .ci-gitlab.yml:

$REGISTRY_USER: Represents the username for Docker registry authentication.

$REGISTRY_PASS: Represents the password for Docker registry authentication.

$IMAGE_NAME: Represents the name of the Docker image.

$IMAGE_TAG: Represents the tag of the Docker image.

$SSH_KEY: Represents the SSH key used for authentication.

$SERVER_IP: Represents the IP address of the remote server.

$SSH_USER: Represents the SSH username.

$CONTAINER_NAME: Represents the name of the Docker container.

$POSTGRES_HOST: Represents the host of the PostgreSQL database.

$POSTGRES_DATABASE: Represents the name of the PostgreSQL database.

$POSTGRES_USER: Represents the username for PostgreSQL authentication.

$POSTGRES_PASSWORD: Represents the password for PostgreSQL authentication.

K8S:

kubectl apply -f Deployment.yaml

kubectl apply -f Service.yaml