<commit_before>= Kubernetes - Enforcing Network Security Policies with Calico
:toc:

https://www.projectcalico.org[Calico] is an open-source plugin that allows for fine-grained network policy enforcement, ensuring that traffic within your Kubernetes cluster can only flow in the direction that you specify.  As an example, if we take a scenario where Kubernetes namespaces are used opt enforce boundaries between products, or even enforce boundaries between different environments (e.g. development vs production), network policies can be configured to ensure no unauthorized network traffic is allowed beyond its boundary.  Think of it as being similar to applying Security Groups in the AWS world.

This exercise will walk you through configuring Calico and applying a Network Policy.

== Prerequisites

This chapter uses a cluster with 3 master nodes and 5 worker nodes as described here: link:../cluster-install#multi-master-multi-node-multi-az-gossip-based-cluster[multi-master, multi-node gossip based cluster].

Alternatively, you can create a new cluster and use kops CLI options to specify the networking mode as shown below:

  kops create cluster \
    --name example2.cluster.k8s.local \
    --master-count 1 \<commit_msg>Fixed typo in Calico networking readme<commit_after>= Kubernetes - Enforcing Network Security Policies with Calico
:toc:

https://www.projectcalico.org[Calico] is an open-source plugin that allows for fine-grained network policy enforcement, ensuring that traffic within your Kubernetes cluster can only flow in the direction that you specify.  As an example, if we take a scenario where Kubernetes namespaces are used to enforce boundaries between products, or even enforce boundaries between different environments (e.g. development vs production), network policies can be configured to ensure no unauthorized network traffic is allowed beyond its boundary.  Think of it as being similar to applying Security Groups in the AWS world.

This exercise will walk you through configuring Calico and applying a Network Policy.

== Prerequisites

This chapter uses a cluster with 3 master nodes and 5 worker nodes as described here: link:../cluster-install#multi-master-multi-node-multi-az-gossip-based-cluster[multi-master, multi-node gossip based cluster].

Alternatively, you can create a new cluster and use kops CLI options to specify the networking mode as shown below:

  kops create cluster \
    --name example2.cluster.k8s.local \
    --master-count 1 \
{'fraction_non_alphanumeric': 0.051364365971107544, 'fraction_numerical': 0.0040128410914927765, 'mean_word_length': 4.614864864864865, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5959190', 'n_tokens_mistral': 597, 'n_tokens_neox': 563, 'n_words': 321}