From 9ca1cc7c6314cae8be42d4020d2c28f20516e886 Mon Sep 17 00:00:00 2001 From: Josh Kneubuhl Date: Mon, 2 May 2022 16:22:24 -0400 Subject: [PATCH] Add configuration / guide notes on running the test network on Rancher Signed-off-by: Josh Kneubuhl --- test-network-k8s/README.md | 4 ++-- test-network-k8s/docs/KUBERNETES.md | 30 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/test-network-k8s/README.md b/test-network-k8s/README.md index 48b90aea..d65e4a28 100644 --- a/test-network-k8s/README.md +++ b/test-network-k8s/README.md @@ -25,11 +25,11 @@ _Fabric, Ahoy!_ ## Quickstart -Create a local Kubernetes cluster: +Create a KIND Kubernetes: ```shell ./network kind ``` -For environments with Rancher / k3s + mobyd: +Or for environments running [Rancher k3s](docs/KUBERNETES.md#rancher-desktop-and-k3s): ```shell export TEST_NETWORK_CLUSTER_RUNTIME=k3s diff --git a/test-network-k8s/docs/KUBERNETES.md b/test-network-k8s/docs/KUBERNETES.md index e30db248..5aa5ee29 100644 --- a/test-network-k8s/docs/KUBERNETES.md +++ b/test-network-k8s/docs/KUBERNETES.md @@ -69,6 +69,36 @@ or: $ kind delete cluster ``` +## Rancher Desktop and k3s + +In addition to KIND, the Kube Test Network runs on the k3s Kubernetes provided by [Rancher Desktop](https://rancherdesktop.io). + +To run natively on k3s, skip the creation of a KIND cluster and: + +1. In Rancher's Kubernetes Settings: + 1. Disable Traefik + 2. Select the dockerd (moby) container runtime + 3. Increase Memory allocation to 8 GRAM + 4. Increase CPU allocation to 8 CPU + +2. Reset Kubernetes + +3. Initialize the Nginx ingress and cert-manager: + +```shell +export TEST_NETWORK_CLUSTER_RUNTIME=k3s + +./network cluster-init +``` +- containerd is also a viable runtime. When building images for chaincode-as-a-service, the `--namespace k8s.io` + argument must be applied to the `nerdctl` CLI. + +- For use with containerd: +```shell +export CONTAINER_CLI=nerdctl +``` + + ## Test Network Structure To emulate a more realistic example of multi-party collaboration, the test network