Skip to content

Commit 804b32a

Browse files
committed
Fixed Curator integration.
1 parent a70b30d commit 804b32a

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -233,24 +233,32 @@ You should see something similar to the following:
233233

234234
## Clean up with Curator
235235

236-
Additionally, you can run a Scheduled Job running [Curator](https://github.com/elastic/curator) to clean up your indices (or do other actions on your ES).
237-
238-
For this you need to deploy a Config Map (which configures the Curator) and the Scheduled Job:
236+
Additionally, you can run a [CronJob](http://kubernetes.io/docs/user-guide/cron-jobs/) that will periodically run [Curator](https://github.com/elastic/curator) to clean up your indices (or do other actions on your cluster).
239237

240238
```
241-
kubectl create -f es-curator-configmap.yaml
239+
kubectl create -f es-curator-config.yaml
242240
kubectl create -f es-curator.yaml
243241
```
244242

245-
The pod is set to run once a day at 1 minute past midnight and delete indices that are older than 3 days.
243+
Please, confirm the job has been created.
244+
245+
```
246+
$ kubectl get cronjobs
247+
NAME SCHEDULE SUSPEND ACTIVE LAST-SCHEDULE
248+
curator 1 0 * * * False 0 <none>
249+
```
250+
251+
The job is configured to run once a day at _1 minute past midnight and delete indices that are older than 3 days_.
246252

247-
You can change the schedule by editing the Cron notation in the `es-curator.yaml`.
253+
**Notes**
248254

249-
You can change the action (e.g. delete older than 3 days) by editing the `es-curator-configmap.yaml`. The definition of the `action_file.yaml` is quite self-explaining for simple set ups. For more advanced configuration options, please consult the [Curator Documentation](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html).
255+
- You can change the schedule by editing the cron notation in `es-curator.yaml`.
256+
- You can change the action (e.g. delete older than 3 days) by editing the `es-curator-config.yaml`.
257+
- The definition of the `action_file.yaml` is quite self-explaining for simple set-ups. For more advanced configuration options, please consult the [Curator Documentation](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html).
250258

251-
If you want to remove Curator again, just run:
259+
If you want to remove the curator job, just run:
252260

253261
```
254-
kubectl delete scheduledjob curator
262+
kubectl delete cronjob curator
255263
kubectl delete configmap curator-config
256264
```

es-curator-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ apiVersion: v1
22
kind: ConfigMap
33
metadata:
44
name: curator-config
5-
namespace: logging
65
data:
76
action_file.yml: |-
87
---

es-curator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: batch/v2alpha1
2-
kind: ScheduledJob
2+
kind: CronJob
33
metadata:
44
name: curator
55
spec:

0 commit comments

Comments
 (0)