From 110c3a77ec7e90f319882ef0022a981d3f7e4c5c Mon Sep 17 00:00:00 2001 From: duyhenryer Date: Fri, 26 Jan 2024 15:43:51 +0700 Subject: [PATCH] Add README.md --- README.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dd799d7..ce973c9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,62 @@ # nettools -Nettools to debugs +Nettools to debugs. Container image with network tools for troubleshooting Kubernetes clusters + +- To check some networking issues in a cluster: + +```sh +kubectl run -it --image=ghcr.io/duyhenryer/nettools:1.0.0 nettools --restart=Never -n default +``` + +- Pod template example: +````yaml +apiVersion: v1 +kind: Pod +metadata: + name: nettools + namespace: default +spec: + containers: + - name: nettools + image: ghcr.io/duyhenryer/nettools:1.0.0 + command: ["/bin/sleep", "infinity"] + imagePullPolicy: IfNotPresent + restartPolicy: Never +```` +- Deplyment template example: +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nettools + namespace: default +spec: + replicas: 1 + selector: + matchLabels: + app: nettools + template: + metadata: + labels: + app: nettools + spec: + containers: + - name: nettools + image: ghcr.io/duyhenryer/nettools:1.0.0 + command: ["/bin/sleep", "infinity"] + imagePullPolicy: IfNotPresent +``` + +You can keep the following yaml file handy and run it in a pod + +```sh +kubectl apply -f nettools.yaml +``` +and login to the container +```sh +kubectl exec -it nettools -n default bash +``` +- If you just want to use the network tools on a docker host: + +```sh +docker run -it ghcr.io/duyhenryer/nettools:1.0.0 +``` \ No newline at end of file