Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Documentation for Recommendation #732

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/guides/elasticsearch/cli/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ menu:
identifier: es-cli-cli
name: Quickstart
parent: es-cli-elasticsearch
weight: 100
weight: 110
menu_name: docs_{{ .version }}
section_menu_id: guides
---
Expand Down
10 changes: 10 additions & 0 deletions docs/guides/elasticsearch/recommendation/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Elasticsearch Recommendation
menu:
docs_{{ .version }}:
identifier: es-recommendation-elasticsearch
name: Recommendation
parent: es-elasticsearch-guides
weight: 100
menu_name: docs_{{ .version }}
---
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions docs/guides/elasticsearch/recommendation/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Elasticsearch Recommendation
description: Elasticsearch Recommendation Overview
menu:
docs_{{ .version }}:
identifier: es-recommendation-overview
name: Overview
parent: es-recommendation-elasticsearch
weight: 10
menu_name: docs_{{ .version }}
section_menu_id: guides
---

> New to KubeDB? Please start [here](/docs/README.md).

# Recommendation for KubeDB managed Elasticsearch

Databases on Kubernetes in production grade infrastructure often need to go through several administrative operations depending on specific resource requirements. Such operations include vertical scaling (cpu, memory) and storage expansion. Autoscaling support for KubeDB managed databases takes care of it. However, databases also need to go through some maintenance operations in order to ensure security, enhance performance, getting bug fixes and new features etc. Such operations mostly require organization's manual intervention. Even if these operations are automated, they need to be done in surveillance. KubeDB simplifies this by generating K8s Native Recommendations.

## Overview

Recommendation is a custom resource definition object which is created by KubeDB ops-manager controller and managed by supervisor. So, You need to have KubeDB and Supervisor installed first. You can simply install supervisor along with other KubeDB components using `--set supervisor.enabled=true` flag while installing KubeDB via helm chart.

<p align="center">
<img alt="Recommendation Generation" src="/docs/guides/elasticsearch/recommendation/images/recommendation-generation.png">
</p>

KubeDB provisioner watches user provided database custom resource spec and creates/sync all the necessary DB resources. Once the Database is ready KubeDB Ops-manager watches the DB and creates Recommendation if it requires. KubeDB Supervisor then watches the Recommendation, updates status of the recommendation, creates recommended operation via OpsRequest if deadline reaches or manually triggered and watches the OpsRequest status to update accordingly in Recommendation custom resource.

KubeDB provides Three types of recommendation for Elasticsearch and Opensearch.

1. [Version Update Recommendation](./version-update-recommendation.md)
2. TLS Certificate Rotation Recommendation
3. Authentication Secret Rotation Recommendation

The next page describes these recommendations, how to enable/disable them, their generation mechanism and usability.

## Next Steps

- Learn how to monitor Elasticsearch database with KubeDB using [builtin-Prometheus](/docs/guides/elasticsearch/monitoring/using-builtin-prometheus.md) and using [Prometheus operator](/docs/guides/elasticsearch/monitoring/using-prometheus-operator.md).
- Learn how to monitor PostgreSQL database with KubeDB using [builtin-Prometheus](/docs/guides/postgres/monitoring/using-builtin-prometheus.md) and using [Prometheus operator](/docs/guides/postgres/monitoring/using-prometheus-operator.md).
- Learn how to monitor MySQL database with KubeDB using [builtin-Prometheus](/docs/guides/mysql/monitoring/builtin-prometheus/index.md) and using [Prometheus operator](/docs/guides/mysql/monitoring/prometheus-operator/index.md).
- Learn how to monitor MongoDB database with KubeDB using [builtin-Prometheus](/docs/guides/mongodb/monitoring/using-builtin-prometheus.md) and using [Prometheus operator](/docs/guides/mongodb/monitoring/using-prometheus-operator.md).
- Learn how to monitor Redis server with KubeDB using [builtin-Prometheus](/docs/guides/redis/monitoring/using-builtin-prometheus.md) and using [Prometheus operator](/docs/guides/redis/monitoring/using-prometheus-operator.md).
- Learn how to monitor Memcached server with KubeDB using [builtin-Prometheus](/docs/guides/memcached/monitoring/using-builtin-prometheus.md) and using [Prometheus operator](/docs/guides/memcached/monitoring/using-prometheus-operator.md).
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
title: Elasticsearch Version Update Recommendation
menu:
docs_{{ .version }}:
identifier: es-version-update-recommendation
name: Version Update Recommendation
parent: es-recommendation-elasticsearch
weight: 20
menu_name: docs_{{ .version }}
section_menu_id: guides
---

> New to KubeDB? Please start [here](/docs/README.md).

# Elasticsearch Version Update Recommendation

Database versions often need to be updated due to several reasons. Older database versions may have vulnerabilities that hackers can exploit. New versions often include optimizations for query execution, indexing, and storage mechanisms. Modern databases frequently introduce new features, such as better data types, improved indexing methods, or advanced analytics capabilities. Database vendors release patches and updates to address these issues and introduce new features.

`Recommendation` is a Kubernetes `Custom Resource Definitions` (CRD). It provides a declarative recommendation for KubeDB managed databases like [Elasticsearch](https://www.elastic.co/products/elasticsearch) and [OpenSearch](https://opensearch.org/) in a Kubernetes native way. KubeDB generates Elasticsearch/Opensearch Version Update recommendation regarding three particular cases.

1. There's been an update in the current version image
2. There's a new version available with a minor/patch fix.
3. There's a new major version available

Let's go through a demo to see version update recommendations being generated. First, get the available Elasticsearch versions provided by KubeDB.

```bash
$ kubectl get elasticsearchversions | grep xpack
xpack-6.8.23 6.8.23 ElasticStack ghcr.io/appscode-images/elastic:6.8.23 17h
xpack-7.13.4 7.13.4 ElasticStack ghcr.io/appscode-images/elastic:7.13.4 17h
xpack-7.14.2 7.14.2 ElasticStack ghcr.io/appscode-images/elastic:7.14.2 17h
xpack-7.16.3 7.16.3 ElasticStack ghcr.io/appscode-images/elastic:7.16.3 17h
xpack-7.17.15 7.17.15 ElasticStack ghcr.io/appscode-images/elastic:7.17.15 17h
xpack-7.17.23 7.17.23 ElasticStack ghcr.io/appscode-images/elastic:7.17.23 17h
xpack-7.17.25 7.17.25 ElasticStack ghcr.io/appscode-images/elastic:7.17.25 16h
xpack-8.11.1 8.11.1 ElasticStack ghcr.io/appscode-images/elastic:8.11.1 17h
xpack-8.11.4 8.11.4 ElasticStack ghcr.io/appscode-images/elastic:8.11.4 17h
xpack-8.13.4 8.13.4 ElasticStack ghcr.io/appscode-images/elastic:8.13.4 17h
xpack-8.14.1 8.14.1 ElasticStack ghcr.io/appscode-images/elastic:8.14.1 17h
xpack-8.14.3 8.14.3 ElasticStack ghcr.io/appscode-images/elastic:8.14.3 17h
xpack-8.15.0 8.15.0 ElasticStack ghcr.io/appscode-images/elastic:8.15.0 17h
xpack-8.15.4 8.15.4 ElasticStack ghcr.io/appscode-images/elastic:8.15.4 16h
xpack-8.16.0 8.16.0 ElasticStack ghcr.io/appscode-images/elastic:8.16.0 16h
xpack-8.2.3 8.2.3 ElasticStack ghcr.io/appscode-images/elastic:8.2.3 17h
xpack-8.5.3 8.5.3 ElasticStack ghcr.io/appscode-images/elastic:8.5.3 17h
xpack-8.6.2 8.6.2 ElasticStack ghcr.io/appscode-images/elastic:8.6.2 17h
xpack-8.8.2 8.8.2 ElasticStack ghcr.io/appscode-images/elastic:8.8.2 17h
```

Let's deploy an Elasticsearch cluster with version `xpack-8.15.0`.

```yaml
apiVersion: kubedb.com/v1
kind: Elasticsearch
metadata:
name: es
namespace: demo
spec:
version: xpack-8.15.0
storageType: Durable
deletionPolicy: WipeOut
topology:
master:
replicas: 2
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
data:
replicas: 2
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
ingest:
replicas: 1
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
```



## Next Steps

- Learn about [backup & restore](/docs/guides/elasticsearch/backup/stash/overview/index.md) Elasticsearch database using Stash.
- Learn how to configure [Elasticsearch Topology Cluster](/docs/guides/elasticsearch/clustering/topology-cluster/simple-dedicated-cluster/index.md).
- Monitor your Elasticsearch database with KubeDB using [`out-of-the-box` Prometheus operator](/docs/guides/elasticsearch/monitoring/using-prometheus-operator.md).
- Use [private Docker registry](/docs/guides/elasticsearch/private-registry/using-private-registry.md) to deploy Elasticsearch with KubeDB.
- Want to hack on KubeDB? Check our [contribution guidelines](/docs/CONTRIBUTING.md).
Loading