Updated cluster name

This commit is contained in:
root 2023-07-23 23:39:12 -06:00
parent f5faecaae4
commit 9eb2e23652

View File

@ -16,7 +16,7 @@ if [ "$(podman inspect -f '{{.State.Running}}' ${reg_name} 2>/dev/null || true)"
fi fi
# Create cluster, with ingress and registry patches # Create cluster, with ingress and registry patches
if [ ! "$(kind get clusters -q | egrep '^ek-demo$' >/dev/nulli)" ]; then if [ "$(kind get clusters -q | egrep '^ek-demo$' 2>/dev/null)" != "ek-demo" ]; then
cat <<-EOF | kind create cluster -n ek-demo --image kindest/node:v1.24.15 --kubeconfig .kube/config --config=- cat <<-EOF | kind create cluster -n ek-demo --image kindest/node:v1.24.15 --kubeconfig .kube/config --config=-
kind: Cluster kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4 apiVersion: kind.x-k8s.io/v1alpha4
@ -47,7 +47,7 @@ fi
# Add registry to each node # Add registry to each node
REGISTRY_DIR="/etc/containerd/certs.d/localhost:${reg_port}" REGISTRY_DIR="/etc/containerd/certs.d/localhost:${reg_port}"
for node in $(kind get nodes -q --name staticweb); do for node in $(kind get nodes -q --name ek-demo); do
podman exec "${node}" mkdir -p "${REGISTRY_DIR}" podman exec "${node}" mkdir -p "${REGISTRY_DIR}"
cat <<EOF | podman exec -i "${node}" cp /dev/stdin "${REGISTRY_DIR}/hosts.toml" cat <<EOF | podman exec -i "${node}" cp /dev/stdin "${REGISTRY_DIR}/hosts.toml"
[host."http://${reg_name}:5000"] [host."http://${reg_name}:5000"]