29 lines
1.2 KiB
Bash
Executable File
29 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
reg_name='kind-registry'
|
|
reg_port='5000'
|
|
running="$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)"
|
|
if [ "${running}" != 'true' ]; then
|
|
docker run \
|
|
-d --restart=always -p "${reg_port}:5000" --name "${reg_name}" \
|
|
registry:latest
|
|
fi
|
|
|
|
docker network connect "kind" "kind-registry"
|
|
# http://localhost:5000/v2/_catalog
|
|
|
|
# Portainer local
|
|
# https://documentation.portainer.io/v2.0/deploy/ceinstalldocker/
|
|
docker volume create portainer_data
|
|
docker run -d -p 9000:9000 --name=portainer --restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
|
|
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent
|
|
# Endpoints->Type:Docker->Connect via:socket
|
|
# http://localhost:9000
|
|
|
|
# Portainer kind
|
|
# https://documentation.portainer.io/v2.0/deploy/ceinstallk8s/
|
|
helm repo add portainer https://portainer.github.io/k8s/
|
|
helm repo update
|
|
helm install --create-namespace -n portainer portainer portainer/portainer --set service.type=LoadBalancer
|
|
# kubectl get services --all-namespaces
|
|
# http://lbIP:9000
|