blob: e6b01e1809b71fcf0c5266e7babbe7f75bb42115 [file] [log] [blame]
giolekvad65f7cb2020-12-09 10:26:20 +04001#!/bin/bash
2
3ROOT="$(dirname -- $(pwd))"
4
5k3d cluster create pcloud-dev \
6 --servers=1 \
7 --k3s-server-arg="--disable=traefik" \
giolekva918b79d2020-12-09 12:39:41 +04008 --port="8080:80@loadbalancer" \
9 --port="30500:30500@server[0]"
giolekvad65f7cb2020-12-09 10:26:20 +040010k3d kubeconfig merge pcloud-dev --switch-context
11
12# Traefik
13helm repo add traefik https://containous.github.io/traefik-helm-chart
14helm repo update
15kubectl create namespace traefik
16helm --namespace=traefik install traefik traefik/traefik \
17 --set additionalArguments="{--providers.kubernetesingress,--global.checknewversion=true}" \
18 --set ports.traefik.expose=True
19
20# Container Registry
giolekva918b79d2020-12-09 12:39:41 +040021## You ca build and push images from host machine to lcoal dev environment using:
22## docker build --tag=localhost:30500/foo/bar:latest .
23## docker push pcloud-localhost:30500/foo/bar:latest
giolekvad65f7cb2020-12-09 10:26:20 +040024kubectl apply -f $ROOT/apps/container-registry/install.yaml
giolekvaa517b842020-12-15 16:37:19 +040025echo "Waiting for Container Registry to start"
26sleep 2
27kubectl -n container-registry wait --timeout=-1s --for=condition=Ready pod/registry-0