Contents

00 Getting Started

00 Motivation

01 🐳 Docker

00 Understanding Docker

02 🎱 Kubernetes

00 Understanding Kubernetes
04 Using Kubernetes

03 🦊 GitLab

00 Understanding GitLab

04 πŸ’½ Server

00 Provisoning a Server

Using Kubernetes

kubectl

kubectl is the CLI tool that allows interaction with your Kubernetes cluster. In the following you will find some useful commands.

kubectl get all [--all-namespaces]
kubectl top pod

Apply/Delete Manifest YAML

kubectl apply[delete] -f ./MANIFEST_NAME.yaml

Pods, Deployments and Services

Multiple Resources in one Manifest

Most of the time, you don’t want to create single resources at a time. E.g. when you create a deployment, you almost certainly also want to create a service. If so, you can simply chain resource definition by separating them with three dashes:

[Some Resource]
[...]

--- 

[Nex Resource]
[...]

Define Environment Variables for Pods inside YAML

apiVersion: v1
kind: Pod
metadata:
  name: podname
  labels:
    purpose: some-purpose
spec:
  containers:
  - name: container-name
    image: image-name
    # This is for local image usage only.
    # Remember to: 
    # eval $(minikube -p minikube docker-env)
    imagePullPolicy: Never 
    env:
      - name: OTREE_IN_MEMORY
        value: "1" 
      - name: DATABASE_URL
        value: "postgres://postgres:password@host:5432/django_db"
      - name: OTREE_ADMIN_PASSWORD
        value: "pwd"
      - name: OTREE_PRODUCTION
        value: "1"
      - name: OTREE_AUTH_LEVEL
        value: "STUDY"
Imprint

Designed & Developed by Jasper Anders