Skip to content

Commit 4f4bfa6

Browse files
author
nicolaka
committed
updates to the README
1 parent e76c982 commit 4f4bfa6

File tree

1 file changed

+5
-73
lines changed

1 file changed

+5
-73
lines changed

README.md

Lines changed: 5 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ Cool thing about namespaces is that you can switch between them. You can enter a
3030

3131
If you want to spin up a throw away container for debugging.
3232

33-
`$ kubectl run --generator=run-pod/v1 tmp-shell --rm -i --tty --image nicolaka/netshoot -- /bin/bash`
33+
`$ kubectl run tmp-shell --rm -i --tty --image nicolaka/netshoot -- /bin/bash`
3434

3535
And if you want to spin up a container on the host's network namespace.
3636

37-
`$ kubectl run tmp-shell --generator=run-pod/v1 --rm -i --tty --overrides='{"spec": {"hostNetwork": true}}' --image nicolaka/netshoot -- /bin/bash`
37+
`$ kubectl run tmp-shell --rm -i --tty --overrides='{"spec": {"hostNetwork": true}}' --image nicolaka/netshoot -- /bin/bash`
3838

3939
**Network Problems**
4040

@@ -103,76 +103,7 @@ To troubleshoot these issues, `netshoot` includes a set of powerful tools as rec
103103
vim
104104
websocat
105105

106-
## **Docker EE 2.0 + Kubernetes Use Cases:**
107-
Here's a list of use-cases that can help you understand when and how to use this container to solve networking issues in your Docker cluster. Please feel free to add your own use-case where you used `netshoot` to investigate, trouble-shoot, or just learn more about your environment!!!
108-
109-
110-
## Managing Kubernetes Calico CNI with calicoctl
111-
112-
In Docker Enterprise Edition, and in so many Kubernetes-based solutions, [Calico](https://www.projectcalico.org/) is used as the default CNI plugin of choice. This means that all the pod networking related resources ( IP assignment, routing, network policies, etc..) is handled by Calico. [calicoctl](https://github.com/projectcalico/calicoctl) is a cli tool to makes it easy to manage Calico network and security policy, as well as other Calico configurations. The calicoctl tool talks directly to `etcd`, so it's often not possible or recommended to expose etcd outside of the Kubernetes cluster. A recommended way to use calicoctl is to run it on a the master node inside the cluster.
113-
114-
Assuming you are running Docker EE 2.0 (although this should work on any Kuberenetes cluster with Calico installed), run the `netshoot` as a deployment using [this deployment](configs/netshoot-calico.yaml). This deployment will use the `kube-system` namespace.
115-
116-
```
117-
# Note: This step assumes you loaded UCP client bundle and have kubectl working as expected.
118-
🐳 → kubectl apply -f netshoot-calico.yaml
119-
```
120-
121-
This deployment will deploy a single pod on a master node and automatically load up etcd certs so you can easily start using calicoctl. Now it's time to exec into the pod:
122-
123-
```
124-
🐳 → kubectl get pod --selector=app=netshoot -n kube-system
125-
NAME READY STATUS RESTARTS AGE
126-
netshoot-calico-deploy-57b8896459-rzqz4 1/1 Running 0 1h
127-
```
128-
129-
Now exec into this pod and use the calicoctl directly without any further configurations! Full documentations on using the calicoctl tool is found [here](https://docs.projectcalico.org/v3.1/reference/calicoctl/commands/).
130-
131-
```
132-
🐳 → kubectl exec -it -n kube-system netshoot-calico-deploy-57b8896459-rzqz4 -- /bin/bash -l
133-
dP dP dP
134-
88 88 88
135-
88d888b. .d8888b. d8888P .d8888b. 88d888b. .d8888b. .d8888b. d8888P
136-
88' `88 88ooood8 88 Y8ooooo. 88' `88 88' `88 88' `88 88
137-
88 88 88. ... 88 88 88 88 88. .88 88. .88 88
138-
dP dP `88888P' dP `88888P' dP dP `88888P' `88888P' dP
139-
140-
Welcome to Netshoot! (github.com/nicolaka/netshoot)
141-
root @ /
142-
[1] 🐳 → calicoctl get wep
143-
WORKLOAD NODE NETWORKS INTERFACE
144-
nginx-deployment-569477d6d8-98xv5 ip-10-56-14-210 192.168.134.207/32 calia756b40818a
145-
netshoot-deploy-6bffc797bf-cfgpp ip-10-56-17-161 192.168.63.80/32 cali50d3753ec26
146-
nginx-deployment-569477d6d8-6klz6 ip-10-56-17-161 192.168.63.79/32 caliaef53a8ccae
147-
148-
149-
root @ /
150-
[2] 🐳 → calicoctl get ippool
151-
NAME CIDR
152-
default-ipv4-ippool 192.168.0.0/16
153-
154-
155-
root @ /
156-
[3] 🐳 → calicoctl get bgpconfig -o yaml
157-
apiVersion: projectcalico.org/v3
158-
items:
159-
- apiVersion: projectcalico.org/v3
160-
kind: BGPConfiguration
161-
metadata:
162-
creationTimestamp: 2018-05-03T18:04:13Z
163-
name: default
164-
resourceVersion: "4519634"
165-
uid: 631aa7d6-4efc-11e8-92d5-06982eb5f90e
166-
spec:
167-
asNumber: 63400
168-
logSeverityScreen: Info
169-
nodeToNodeMeshEnabled: false
170-
kind: BGPConfigurationList
171-
metadata:
172-
resourceVersion: "6152496"
173-
```
174-
175-
##**Docker + Swarm Use Cases:**
106+
## **Sample Use-cases**
176107

177108
## iperf
178109

@@ -670,4 +601,5 @@ More info on `termshark` [here](https://github.com/gcla/termshark)
670601

671602
## Feedback + Contribution
672603

673-
Feel free to provide feedback and contribute networking troubleshooting tools and use-cases by opening PRs.
604+
Feel free to provide feedback and contribute networking troubleshooting tools and use-cases by opening PRs. If you would like to add any package, open a PR with the rationale and ensure that you update both the Dockerfile and the README with some examples on how to use it!
605+

0 commit comments

Comments
 (0)