-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
28 lines (18 loc) · 833 Bytes
/
Copy pathREADME
File metadata and controls
28 lines (18 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
A simple example of how to add cronstable to a docker image. To try it out,
run for instance:
$ docker build -t cronstabledemo .
$ docker run -ti cronstabledemo -l DEBUG # Ctrl-C to stop
Moreover, you can find an example of deploying to Kubernetes in the
``k8s-deploy.yaml`` file. To test:
$ kubectl apply -f k8s-deploy.yaml
deployment "cronstabledemo" created
Check that the pod was created:
$ kubectl get pods -l app=cronstabledemo
NAME READY STATUS RESTARTS AGE
cronstabledemo-cffff957f-9dt5r 1/1 Running 0 1m
Follow the logs from the pod:
$ kubectl logs --timestamps -f cronstabledemo-cffff957f-9dt5r
(hit Ctrl-C to stop following logs)
To undo the changes and stop the pod:
$ kubectl delete deployment cronstabledemo
deployment "cronstabledemo" deleted