Skip to content

Commit

Permalink
netpol
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud ALCABAS committed Jun 15, 2023
1 parent 7271ead commit 020e94e
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
Binary file added assets/images/netpol/allow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/netpol/apply.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/netpol/gui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/netpol/ko.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/netpol/ok.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions netpol.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,36 @@ permalink: /netpol
nav_order: 4
---
# Securing Namespaces with Network Policies
## Test existing connectivity

```
kubectl run -i --rm --restart=Never --image=busybox:latest -n ns1 shell -- wget -qO- http://test.ns2.svc.cluster.local
```

![](assets/images/netpol/allow.png)

## Apply demo network policy

```
kubectl apply -f exercice-files/lab3.yaml
```

![](assets/images/netpol/apply.png)

This demo policy has been built using a GUI available here: [https://editor.networkpolicy.io/](https://editor.networkpolicy.io/)

![](assets/images/netpol/gui.png)

## Test new connectivity

```
kubectl run -i --rm --restart=Never --image=busybox:latest -n ns1 shell -- wget -qO- http://test.ns1.svc.cluster.local
```

![](assets/images/netpol/ok.png)

```
kubectl run -i --rm --restart=Never --image=busybox:latest -n ns1 shell -- wget -qO- http://test.ns2.svc.cluster.local
```

![](assets/images/netpol/ko.png)

0 comments on commit 020e94e

Please sign in to comment.