# Tutorial: Self-hosted CI/CD deployment in a homelab with GitLab CI, Docker, and Kubernetes

DevFeed: [Tutorial: Self-hosted CI/CD deployment in a homelab with GitLab CI, Docker, and Kubernetes](<https://devfeed.tech/articles/build-deploy-your-own-code-in-your-homelab-10662.md>)

Original publisher: [Read original article](<https://technotim.com/posts/self-hosted-devops-stack/>)

Author: Techno Tim

Published: 2020-09-12T14:00:00Z

Content type: tutorial

Language: en

Sources: [Techno Tim](<https://devfeed.tech/sources/techno-tim.md>)

Topics: [CI/CD](<https://devfeed.tech/topics/cicd.md>), [GitLab](<https://devfeed.tech/topics/gitlab.md>), [Homelab](<https://devfeed.tech/topics/homelab.md>), [Docker](<https://devfeed.tech/topics/docker.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [Docker Image](<https://devfeed.tech/topics/docker-image.md>), [kubectl](<https://devfeed.tech/topics/kubectl.md>), [rancher](<https://devfeed.tech/topics/rancher.md>), [Dockerfile](<https://devfeed.tech/topics/dockerfile.md>), [nginx](<https://devfeed.tech/topics/nginx.md>), [React](<https://devfeed.tech/topics/react.md>), [Windows](<https://devfeed.tech/topics/windows.md>)

Tags: [continuous-delivery](<https://devfeed.tech/tags/continuous-delivery.md>), [continuous-integration](<https://devfeed.tech/tags/continuous-integration.md>), [developer](<https://devfeed.tech/tags/developer.md>), [docker](<https://devfeed.tech/tags/docker.md>), [docker-container](<https://devfeed.tech/tags/docker-container.md>), [docker-image](<https://devfeed.tech/tags/docker-image.md>), [gitlab-ci](<https://devfeed.tech/tags/gitlab-ci.md>), [guide](<https://devfeed.tech/tags/guide.md>), [homelab](<https://devfeed.tech/tags/homelab.md>), [kubectl](<https://devfeed.tech/tags/kubectl.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [nginx](<https://devfeed.tech/tags/nginx.md>), [rancher](<https://devfeed.tech/tags/rancher.md>), [react](<https://devfeed.tech/tags/react.md>), [registry](<https://devfeed.tech/tags/registry.md>), [self-hosted](<https://devfeed.tech/tags/self-hosted.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>), [windows](<https://devfeed.tech/tags/windows.md>), [wsl](<https://devfeed.tech/tags/wsl.md>)

## AI overview

This tutorial explains how to set up a self-hosted development pipeline in a homelab. It covers repository setup, unit testing with a GitLab CI runner, building and publishing a Docker image to a container registry, and deploying the container to a self-hosted Kubernetes cluster with kubectl.

## Source excerpt

So you're a software engineer or a developer who wants to self-host your own code in your own homelab? Well this is the tutorial for you! In this step-by-step guide we'll walk through setting up a repo, building and testing our own code (with unit tests) in a self-hosted Gitlab CI runner in our CI pipeline, then we'll build a Docker image and push it up to a container registry, then we'll use...