From 18981371d2a3bf0b1482f031ab02d804631dea2e Mon Sep 17 00:00:00 2001 From: Netanel Bollag Date: Wed, 17 May 2023 11:58:47 +0300 Subject: [PATCH] CR Fix --- .../cluster-setup-for-visual-tutorials.md | 95 ------------------- docs/_common/cluster-setup.md | 3 +- .../visual-ibac-kafka-k8s.mdx | 2 +- .../visual-ibac-network-policies.mdx | 2 +- .../visual-k8s-cluster-mapping.mdx | 2 +- 5 files changed, 5 insertions(+), 99 deletions(-) delete mode 100644 docs/_common/cluster-setup-for-visual-tutorials.md diff --git a/docs/_common/cluster-setup-for-visual-tutorials.md b/docs/_common/cluster-setup-for-visual-tutorials.md deleted file mode 100644 index b5a747a5b..000000000 --- a/docs/_common/cluster-setup-for-visual-tutorials.md +++ /dev/null @@ -1,95 +0,0 @@ -Below are instructions for setting up a Kubernetes cluster with network policies. -If you don't have a cluster already, we recommend starting out with a Minikube cluster. - - - - -If you don't have the Minikube CLI, first [install it](https://minikube.sigs.k8s.io/docs/start/). - -Then start your Minikube cluster with Calico, in order to enforce network policies. - -```bash -minikube start --cpus=4 --memory 8192 --disk-size 32g --cni=calico -``` -The minikube system requirements are for the demo application we deploy in the visual tutorials. - - - -Visit the official documentation, or follow the instructions below: - - - -To use the gcloud CLI for this tutorial, first [install](https://cloud.google.com/sdk/docs/install) and then -[initialize](https://cloud.google.com/sdk/docs/initializing) it. - -***To enable network policy enforcement when creating a new cluster:*** - -Run the following command: -```bash -gcloud container clusters create CLUSTER_NAME --enable-network-policy --zone=ZONE -``` -(Replace `CLUSTER_NAME` with the name of the new cluster and `ZONE` with your zone.) - -***To enable network policy enforcement for an existing cluster, perform the following tasks:*** - -Run the following command to enable the add-on: -```bash -gcloud container clusters update CLUSTER_NAME --update-addons=NetworkPolicy=ENABLED -``` -(Replace `CLUSTER_NAME` with the name of the cluster.) - -Then enable network policy enforcement on your cluster, re-creating your cluster's node pools with network policy enforcement enabled: -```bash -gcloud container clusters update CLUSTER_NAME --enable-network-policy -``` -(Replace `CLUSTER_NAME` with the name of the cluster.) - - - - -***To enable network policy enforcement when creating a new cluster:*** - -1. Go to the Google Kubernetes Engine page in the Google Cloud console. - The remaining steps will appear automatically in the Google Cloud console. - -2. On the Google Kubernetes Engine page, click Create. -3. Configure your cluster as desired. -4. From the navigation pane, under Cluster, click Networking. -5. Select the checkbox to Enable network policy. -6. Click Create. - - -***To enable network policy enforcement for an existing cluster:*** - -1. Go to the Google Kubernetes Engine page in the Google Cloud console. The remaining steps will appear automatically in the Google Cloud console. - -2. In the cluster list, click the name of the cluster you want to modify. -3. Under Networking, in the Network policy field, click Edit network policy. -4. Select the checkbox to Enable network policy for master and click Save Changes. -5. Wait for your changes to apply, and then click Edit network policy again. -6. Select the checkbox to Enable network policy for nodes. -7. Click Save Changes. - - - - - -Visit the official documentation, or follow the instructions below: - -1. Spin up an [EKS cluster](https://docs.aws.amazon.com/eks/latest/userguide/create-cluster.html) using the console, AWS CLI or `eksctl`. -2. Install Calico for network policy enforcement, without replacing the CNI: -```bash -kubectl apply -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/v1.12.6/config/master/calico-operator.yaml -kubectl apply -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/v1.12.6/config/master/calico-crs.yaml -``` - - - -You can set up an AKS cluster using this [guide](https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-deploy-cli). - -For network policy support, no setup is required: Azure AKS comes with a built-in network policy implementation called Azure Network Policy Manager. You can choose whether you'd like to use this option or Calico when you create a cluster. - - - Read more at the official documentation site. - - diff --git a/docs/_common/cluster-setup.md b/docs/_common/cluster-setup.md index 89bda22d7..a3e8310b4 100644 --- a/docs/_common/cluster-setup.md +++ b/docs/_common/cluster-setup.md @@ -9,8 +9,9 @@ If you don't have the Minikube CLI, first [install it](https://minikube.sigs.k8s Then start your Minikube cluster with Calico, in order to enforce network policies. ```bash -minikube start --cni=calico +minikube start --cpus=4 --memory 8192 --disk-size 32g --cni=calico ``` +The increased CPU, memory and disk resource allocations are required to be able to deploy the ecommerce app used in the visual tutorials successfully. diff --git a/docs/quick-visual-tutorials/visual-ibac-kafka-k8s.mdx b/docs/quick-visual-tutorials/visual-ibac-kafka-k8s.mdx index 58e50003b..a6db8e257 100644 --- a/docs/quick-visual-tutorials/visual-ibac-kafka-k8s.mdx +++ b/docs/quick-visual-tutorials/visual-ibac-kafka-k8s.mdx @@ -35,7 +35,7 @@ Before you start, you'll need a Kubernetes cluster. You won't actually need [network policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/) in this tutorial, so you can follow the steps below while skipping the network policies (CNI) enablement bits, or keep them as is. -{@include: ../_common/cluster-setup-for-visual-tutorials.md} +{@include: ../_common/cluster-setup.md}
diff --git a/docs/quick-visual-tutorials/visual-ibac-network-policies.mdx b/docs/quick-visual-tutorials/visual-ibac-network-policies.mdx index be44468ee..94de0ac5f 100644 --- a/docs/quick-visual-tutorials/visual-ibac-network-policies.mdx +++ b/docs/quick-visual-tutorials/visual-ibac-network-policies.mdx @@ -30,7 +30,7 @@ The following steps are only needed if you haven't already run through the [Kube Before you start, you'll need a Kubernetes cluster. -{@include: ../_common/cluster-setup-for-visual-tutorials.md} +{@include: ../_common/cluster-setup.md}
diff --git a/docs/quick-visual-tutorials/visual-k8s-cluster-mapping.mdx b/docs/quick-visual-tutorials/visual-k8s-cluster-mapping.mdx index a639e96f3..e46011e1c 100644 --- a/docs/quick-visual-tutorials/visual-k8s-cluster-mapping.mdx +++ b/docs/quick-visual-tutorials/visual-k8s-cluster-mapping.mdx @@ -29,7 +29,7 @@ Before you start, you'll need a Kubernetes cluster. While you won't need [network policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/) in this tutorial, you'll use them in the next tutorial, so you may just want to install them now. Otherwise, feel free to skip that aspect. -{@include: ../_common/cluster-setup-for-visual-tutorials.md} +{@include: ../_common/cluster-setup.md}
## Deploy the demo set of services