Debian with personalized tools for various purpose.
In order to use image from GitHub Container Registry instead of Docker Hub, you can replace rtsp/rtsp
with ghcr.io/rtsp/docker-rtsp
anywhere in the instruction below.
docker pull rtsp/rtsp
docker run --rm -it rtsp/rtsp bash
docker run --rm rtsp/rtsp ping -c 3 172.17.0.1
docker run -d --name rtsp rtsp/rtsp
docker exec rtsp ping -c 3 172.17.0.1
docker exec -it rtsp bash
---
apiVersion: v1
kind: Pod
metadata:
name: rtsp
spec:
containers:
- name: rtsp
image: rtsp/rtsp:latest
kubectl exec rtsp -- ping -c 3 10.233.0.1
kubectl exec -it rtsp -- bash
This manifests will deploy Pods in all nodes (including control-plane). Useful for network reachability debugging.
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: rtsp
spec:
selector:
matchLabels:
name: rtsp
template:
metadata:
labels:
name: rtsp
spec:
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
containers:
- name: rtsp
image: rtsp/rtsp:latest
imagePullPolicy: IfNotPresent
terminationGracePeriodSeconds: 30
Retrieve Pods Name
kubectl get pods -l name=rtsp -o wide
Output (Trimmed)
NAME READY STATUS AGE IP NODE
rtsp-j7j97 1/1 Running 4d5h 10.233.69.40 k8s-w3
rtsp-kfx7h 1/1 Running 4d16h 10.233.66.10 k8s-m3
rtsp-krttb 1/1 Running 4d16h 10.233.68.43 k8s-w1
rtsp-l8tjd 1/1 Running 4d16h 10.233.67.36 k8s-w2
rtsp-q48n6 1/1 Running 4d16h 10.233.65.7 k8s-m2
rtsp-vw45v 1/1 Running 4d16h 10.233.64.11 k8s-m1
Example: Check that k8s-m2
node (rtsp-q48n6
) able to reach a pod in k8s-m1
node (10.233.64.11
).
kubectl exec rtsp-q48n6 -- ping -c 3 10.233.64.11
or just run it interactively
kubectl exec -it rtsp-q48n6 -- bash
or if you don't mind which Pod to use
kubectl exec -it daemonset/rtsp -- bash
This manifests will deploy a Pod with a 4 GiB persistent storage mounted on /data
.
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: rtsp
spec:
serviceName: rtsp
replicas: 1
selector:
matchLabels:
name: rtsp
template:
metadata:
labels:
name: rtsp
spec:
containers:
- name: rtsp
image: rtsp/rtsp:latest
imagePullPolicy: Always
resources:
requests:
memory: 8Mi
cpu: 10m
limits:
memory: 1024Mi
cpu: 2000m
volumeMounts:
- name: rtsp-data
mountPath: /data
volumeClaimTemplates:
- metadata:
name: rtsp-data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 4Gi
- Docker Hub: rtsp/rtsp
- GitHub: ghcr.io/rtsp/docker-rtsp