These are the example files for my presentation about GitLab + Kubernetes for Continuous Integration and Delivery. The files are also mainly used in my GitLab post series about the GitLab CI runners.
INFO This isn't the best way to deploy to K8s, this is a more of an example how simple it can be.
The presentation can be found here: Kubernetes - WYNTK - GitLab CI + Kubernetes Presentation. The blog post these files were specifically used in is here: GitLab + Kubernetes: Perfect Match for Continuous Delivery with Container.
An uptodate list of all my blog posts around GitLab and Kubernetes can be found on this page. This list is just an excerpt:
- GitLab + Kubernetes: Perfect Match for Continuous Delivery with Container
- Kubernetes - WYNTK - GitLab CI + Kubernetes Presentation
- GitLab + Kubernetes: Running CI Runners in Kubernetes
- GitLab + Kubernetes: GitLab on top of Kubernetes
- GitLab: Use Keycloak as SAML 2.0 OmniAuth Provider
You have to replace the following addresses in all files:
gitlab.edenmal.net
with your GitLab address (examplegitlab.example.com
).registry.edenmal.net
/registry.zerbytes.net
with your Docker Registry address (exampleregistry.example.com
).edenmal.net
(in the Ingress manifest) with your Domain name.
You also need to create a "Docker Login" Secret named regsecret
in the presentation-gitlab-k8s
Namespace. The Namespace manifest is in the manifests/
directory.
The guide for that can be found here: Kubernetes.io - Pull an Image from a Private Registry.
Then you can just import the repository into your GitLab instance and are ready to go.
- GitLab Kubernetes Integration Docs: https://docs.gitlab.com/ce/user/project/integrations/kubernetes.html
- GitLab Kubernetes Integration Docs Environment variables: https://docs.gitlab.com/ce/user/project/integrations/kubernetes.html#deployment-variables
As of GitLab 10.3
the Kubernetes Integration is marked as deprecated and with 10.4
it is now disabled, the following docs show the new feature called Clusters:
- GitLab 10.3 release - Kubernetes integration service: https://about.gitlab.com/2017/12/22/gitlab-10-3-released/#kubernetes-integration-service
- GitLab Clusters Feature Docs: https://docs.gitlab.com/ce/user/project/clusters/index.html
Thanks to @shadycuz - GitHub for his comments with improvements for the code in this repository!