Skip to content

Commit 5256776

Browse files
committed
docs: add usage information
1 parent fee1c7f commit 5256776

File tree

1 file changed

+56
-2
lines changed

1 file changed

+56
-2
lines changed

README.md

+56-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,63 @@ Self-contained development utilities. Includes tmux, nvim, git & more 👨
33

44
## Usage
55

6+
To start an ephemeral Docker image locally:
67
```console
7-
docker pull ghcr.io/brenodt/devbox:main
8-
98
docker run -it --rm ghcr.io/brenodt/devbox:main
109
```
1110

11+
## Example K8S Pod definition
12+
13+
Here's an example pod definition using this container:
14+
```yaml
15+
# pod-helper.yaml
16+
#
17+
# This is a helper pod to debug and work locally from within the cluster,
18+
# with access to their volume mounts and secrets.
19+
#
20+
---
21+
apiVersion: v1
22+
kind: Pod
23+
metadata:
24+
labels:
25+
run: live-helper
26+
name: live-helper
27+
namespace: default
28+
spec:
29+
containers:
30+
- command:
31+
- tail
32+
- -f
33+
- /dev/null
34+
image: ghcr.io/brenodt/devbox:main
35+
imagePullPolicy: Always
36+
name: live-helper
37+
envFrom:
38+
- secretRef:
39+
# Connecting to an Opaque secret
40+
name: shared-cronjob-config
41+
resources:
42+
requests:
43+
cpu: 100m
44+
memory: 128Mi
45+
limits:
46+
cpu: 150m
47+
memory: 256Mi
48+
volumeMounts:
49+
# Connecting to volumes from the cluster
50+
- name: dump-volume
51+
mountPath: /dump
52+
53+
volumes:
54+
- name: dump-volume
55+
persistentVolumeClaim:
56+
claimName: cronjob-dumps-pvc
57+
58+
```
59+
60+
To apply and connect, run:
61+
```console
62+
kubectl apply -f pod-helper.yaml
63+
kubectl exec pod-helper -it -- /bin/bash
64+
```
65+

0 commit comments

Comments
 (0)