Prepare a Local Kubernetes Environment#
The following tutorial uses kind to prepare/set up a local Kubernetes environment for a local ESS standalone deployment on Linux.
Start Docker if it is not already running.
The below steps have been tested with Docker CPU setting of 6.
Open a Terminal window.
Optional. Create a directory for your kind configuration and go to that directory.
Create a
kind-config.yaml
file:cat <<EOF > kind-config.yaml kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 name: my-local-kind nodes: - role: control-plane kubeadmConfigPatches: - | kind: InitConfiguration nodeRegistration: kubeletExtraArgs: node-labels: "ingress-ready=true" extraPortMappings: - containerPort: 80 hostPort: 80 protocol: TCP - containerPort: 443 hostPort: 443 protocol: TCP EOF
This example configuration specifies the cluster name of
my-local-kind
. You can specify a different name for the cluster.Create a cluster, specifying your
kind-config.yaml
file:kind create cluster --config=kind-config.yaml
Enable Ingress controller and configure to allow parsing/addition of server-snippets. For example:
Create a new directory
my-ingress-config
:mkdir my-ingress-config
Create a
my-ingress-config/kustomization.yaml
:cat <<EOF > my-ingress-config/kustomization.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization metadata: name: ingress-nginx namespace: ingress-nginx resources: - https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml configMapGenerator: - name: ingress-nginx-controller namespace: ingress-nginx behavior: merge literals: - allow-snippet-annotations=true EOF
Apply the ingress to the cluster:
kubectl apply -k my-ingress-config/
Enable Certificate management controller:
kubectl apply -f https://github.com/jetstack/cert-manager/releases/latest/download/cert-manager.yaml
Wait for successful setup and rollout of the cert manager and ingress controller.
kubectl -n cert-manager wait --for condition=established --timeout=60s customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io kubectl -n cert-manager rollout status deployment/cert-manager-webhook kubectl -n ingress-nginx rollout status deployment/ingress-nginx-controller
Upon successful completion, this local Kubernetes environment can be used for a standalone ESS deployment. See Installation for details.
For more information on kind, see https://kind.sigs.k8s.io/.