| giolekva | d65f7cb | 2020-12-09 10:26:20 +0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | ROOT="$(dirname -- $(pwd))" |
| 4 | |
| 5 | k3d cluster create pcloud-dev \ |
| 6 | --servers=1 \ |
| 7 | --k3s-server-arg="--disable=traefik" \ |
| giolekva | 918b79d | 2020-12-09 12:39:41 +0400 | [diff] [blame] | 8 | --port="8080:80@loadbalancer" \ |
| 9 | --port="30500:30500@server[0]" |
| giolekva | d65f7cb | 2020-12-09 10:26:20 +0400 | [diff] [blame] | 10 | k3d kubeconfig merge pcloud-dev --switch-context |
| 11 | |
| 12 | # Traefik |
| 13 | helm repo add traefik https://containous.github.io/traefik-helm-chart |
| 14 | helm repo update |
| 15 | kubectl create namespace traefik |
| 16 | helm --namespace=traefik install traefik traefik/traefik \ |
| 17 | --set additionalArguments="{--providers.kubernetesingress,--global.checknewversion=true}" \ |
| 18 | --set ports.traefik.expose=True |
| 19 | |
| 20 | # Container Registry |
| giolekva | 918b79d | 2020-12-09 12:39:41 +0400 | [diff] [blame] | 21 | ## 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 |
| giolekva | d65f7cb | 2020-12-09 10:26:20 +0400 | [diff] [blame] | 24 | kubectl apply -f $ROOT/apps/container-registry/install.yaml |
| giolekva | a517b84 | 2020-12-15 16:37:19 +0400 | [diff] [blame^] | 25 | echo "Waiting for Container Registry to start" |
| 26 | sleep 2 |
| 27 | kubectl -n container-registry wait --timeout=-1s --for=condition=Ready pod/registry-0 |