GithubHelp home page GithubHelp logo

rtsp / docker-net-tools Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 196 KB

Debian Docker image with a lot of network tools preinstalled

Home Page: https://hub.docker.com/r/rtsp/net-tools

License: Apache License 2.0

Dockerfile 57.49% Shell 42.51%
docker net-tools debian docker-image network

docker-net-tools's Introduction

RTSP Network Tools Docker Image

Debian with basic network tools included.

Usage

In order to use image from GitHub Container Registry instead of Docker Hub, you can replace rtsp/net-tools with ghcr.io/rtsp/docker-net-tools anywhere in the instruction below.

Pull Image

docker pull rtsp/net-tools

Interactive Mode

docker run --rm -it rtsp/net-tools bash

Run a Specific Command

docker run --rm rtsp/net-tools ping -c 3 172.17.0.1

Run as Daemon

docker run -d --name net-tools rtsp/net-tools
docker exec net-tools ping -c 3 172.17.0.1

docker exec -it net-tools bash

Run as Kubernetes Pod

---
apiVersion: v1
kind: Pod
metadata:
  name: net-tools
spec:
  containers:
  - name: net-tools
    image: rtsp/net-tools:latest
kubectl exec net-tools -- ping -c 3 10.233.0.1

kubectl exec -it net-tools -- bash

Run as Kubernetes DaemonSet

This manifests will deploy Pods in all nodes (including control-plane). Useful for network reachability debugging.

---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: net-tools
spec:
  selector:
    matchLabels:
      name: net-tools
  template:
    metadata:
      labels:
        name: net-tools
    spec:
      tolerations:
      - key: node-role.kubernetes.io/master
        operator: Exists
        effect: NoSchedule
      containers:
        - name: net-tools
          image: rtsp/net-tools:latest
          imagePullPolicy: IfNotPresent
      terminationGracePeriodSeconds: 30

Retrieve Pods Name

kubectl get pods -l name=net-tools -o wide

Output (Trimmed)

NAME              READY   STATUS    AGE     IP             NODE
net-tools-j7j97   1/1     Running   4d5h    10.233.69.40   k8s-w3
net-tools-kfx7h   1/1     Running   4d16h   10.233.66.10   k8s-m3
net-tools-krttb   1/1     Running   4d16h   10.233.68.43   k8s-w1
net-tools-l8tjd   1/1     Running   4d16h   10.233.67.36   k8s-w2
net-tools-q48n6   1/1     Running   4d16h   10.233.65.7    k8s-m2
net-tools-vw45v   1/1     Running   4d16h   10.233.64.11   k8s-m1

Example: Check that k8s-m2 node (net-tools-q48n6) able to reach a pod in k8s-m1 node (10.233.64.11).

kubectl exec net-tools-q48n6 -- ping -c 3 10.233.64.11

or just run it interactively

kubectl exec -it net-tools-q48n6 -- bash

or if you don't mind which Pod to use

kubectl exec -it daemonset/net-tools -- bash

Links

Packages

Source Code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.