Difficulty: Beginner
Estimated Time: 10 minutes

Apply a Network Policy and Enforce it with Weave Net

In this scenario, you will apply a Kubernetes network policy that defines which containers can communicate with each other. And because you're using Weave Net as the Kubernetes Pod network, these policies are enforced.

You'll also use Weave Cloud to test that the policies have been implemented correctly.

Weave Net enables secure cross-cloud communication between containers. This includes the ability to add firewalls between containers to restrict network communications.

In this scenario, you used Weave Cloud to test the security on an application.

With Weave Cloud you view and monitor your microservices from one convenient troubleshooting dashboard, and together with automated continuous delivery built with your favorite tools, Weave Cloud allows you to create higher quality code more rapidly.

Weave Scope allows developers to explore application deployments and the dependencies.

Weave Flux manages the automation of deployments, and automatically rolls out new versions if the Docker Image changes.

Prometheus and Weave Cortex automatically aggregates and pushes application metrics to Weave Cloud.

Weave Net enforces secure cross-cloud communication between containers using Kubernetes Network Policy.

Try it on your own infrastructure by following the Weave Cloud guides series.

Container Networks & Firewalls

Step 1 of 6

Step 1 - Sign Up To Weave Cloud

You can test that the security is working properly and visualize Weave Net from within Weave Cloud. Before we begin, sign up to Weave Cloud and connect the agents:

1. To begin, sign up for Weave Cloud .

If you already have a Weave Cloud account, you should create a new 'Instance' for this exercise. To create a new instance, use the instance selector drop-down in the top bar and select 'View all instances', then select '+ Connect a cluster' from the top of the page.

When asked, name your instance 'Container Firewalls Lab'.

2. From the setup screens select Kubernetes and then Generic Kubernetes.

3. Copy the command that appears and paste it into the terminal window. This installs the Weave Cloud agents onto the Kubernetes cluster.
Note: When doing this, make sure you use the Standard installation method, not the one using Helm.

4. Wait until the page shows that all agents have connected. (This might take up to a minute or two.)

5. Click the View Your Cluster button to continue to the instance homepage