...

Text file src/edge-infra.dev/hack/kind/check-kind-context.sh

Documentation: edge-infra.dev/hack/kind

     1#!/usr/bin/env bash
     2
     3# This script ensures that the current kubectl context is a kind cluster
     4
     5set -euo pipefail
     6
     7kubectl="$1"
     8context=$($kubectl config current-context)
     9if [[ "$context" != "kind-edge" ]]; then
    10    echo "current k8s context is $context. expected kind-edge"
    11    exit 1
    12fi

View as plain text