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 the Kubernetes Operator install instructions #1017

Merged
merged 4 commits into from
Sep 21, 2022
Merged

Conversation

Naarcha-AWS
Copy link
Collaborator

Signed-off-by: Naarcha-AWS [email protected]

Fixes #562

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@Naarcha-AWS Naarcha-AWS added 3 - Tech review PR: Tech review in progress backport 2.0 PR: Backport label for v2.0.x backport 2.1 PR: Backport label for 2.1 backport 2.2 PR: Backport label for 2.2 labels Aug 29, 2022
@Naarcha-AWS Naarcha-AWS self-assigned this Aug 29, 2022
Signed-off-by: Naarcha-AWS <[email protected]>
@Naarcha-AWS Naarcha-AWS marked this pull request as ready for review September 12, 2022 18:27
@Naarcha-AWS Naarcha-AWS requested a review from a team as a code owner September 12, 2022 18:27
@Naarcha-AWS Naarcha-AWS added 4 - Doc review PR: Doc review in progress and removed 3 - Tech review PR: Tech review in progress labels Sep 12, 2022
_clients/k8s-operator.md Outdated Show resolved Hide resolved
_clients/k8s-operator.md Outdated Show resolved Hide resolved
_clients/k8s-operator.md Outdated Show resolved Hide resolved
Copy link
Contributor

@alicejw1 alicejw1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! couple minor suggestions

_clients/k8s-operator.md Outdated Show resolved Hide resolved
_clients/k8s-operator.md Outdated Show resolved Hide resolved
_clients/k8s-operator.md Outdated Show resolved Hide resolved
_clients/k8s-operator.md Outdated Show resolved Hide resolved
Copy link
Contributor

@cwillum cwillum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some editorial stuff from me. Nice job on this.

Signed-off-by: Naarcha-AWS <[email protected]>
@Naarcha-AWS Naarcha-AWS added 5 - Editorial review PR: Editorial review in progress and removed 4 - Doc review PR: Doc review in progress labels Sep 15, 2022
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Naarcha-AWS Please see my comments and let me know if you have any questions. Thanks!

_clients/k8s-operator.md Outdated Show resolved Hide resolved
_clients/k8s-operator.md Outdated Show resolved Hide resolved
_clients/k8s-operator.md Outdated Show resolved Hide resolved
_clients/k8s-operator.md Outdated Show resolved Hide resolved

If you use Helm to manage your K8s cluster, you can use the OpenSearch Kubernetes Operator's CNCF project stored in Artifact Hub, a web-based application for finding, installing, and publishing CNCF packages.

To begin, log into your K8s cluster and add the Helm repository (repo) from [Artifact Hub](https://opster.github.io/opensearch-k8s-operator/).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "into" to "in to".

_clients/k8s-operator.md Outdated Show resolved Hide resolved
_clients/k8s-operator.md Outdated Show resolved Hide resolved
_clients/k8s-operator.md Outdated Show resolved Hide resolved
_clients/k8s-operator.md Outdated Show resolved Hide resolved
_clients/k8s-operator.md Outdated Show resolved Hide resolved
@natebower natebower removed the 5 - Editorial review PR: Editorial review in progress label Sep 16, 2022
Signed-off-by: Naarcha-AWS <[email protected]>
@Naarcha-AWS Naarcha-AWS merged commit a6e47e0 into main Sep 21, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 21, 2022
* Add the Kubernetes Operator install instructions

Signed-off-by: Naarcha-AWS <[email protected]>

* Copy edits

Signed-off-by: Naarcha-AWS <[email protected]>

* Add doc review

Signed-off-by: Naarcha-AWS <[email protected]>

* Add editorial

Signed-off-by: Naarcha-AWS <[email protected]>

Signed-off-by: Naarcha-AWS <[email protected]>
(cherry picked from commit a6e47e0)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 21, 2022
* Add the Kubernetes Operator install instructions

Signed-off-by: Naarcha-AWS <[email protected]>

* Copy edits

Signed-off-by: Naarcha-AWS <[email protected]>

* Add doc review

Signed-off-by: Naarcha-AWS <[email protected]>

* Add editorial

Signed-off-by: Naarcha-AWS <[email protected]>

Signed-off-by: Naarcha-AWS <[email protected]>
(cherry picked from commit a6e47e0)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 21, 2022
* Add the Kubernetes Operator install instructions

Signed-off-by: Naarcha-AWS <[email protected]>

* Copy edits

Signed-off-by: Naarcha-AWS <[email protected]>

* Add doc review

Signed-off-by: Naarcha-AWS <[email protected]>

* Add editorial

Signed-off-by: Naarcha-AWS <[email protected]>

Signed-off-by: Naarcha-AWS <[email protected]>
(cherry picked from commit a6e47e0)
Naarcha-AWS added a commit that referenced this pull request Sep 21, 2022
* Add the Kubernetes Operator install instructions

Signed-off-by: Naarcha-AWS <[email protected]>

* Copy edits

Signed-off-by: Naarcha-AWS <[email protected]>

* Add doc review

Signed-off-by: Naarcha-AWS <[email protected]>

* Add editorial

Signed-off-by: Naarcha-AWS <[email protected]>

Signed-off-by: Naarcha-AWS <[email protected]>
(cherry picked from commit a6e47e0)

Co-authored-by: Naarcha-AWS <[email protected]>
@Naarcha-AWS Naarcha-AWS added the backport 2.3 PR: Backport label for 2.3 label Sep 21, 2022
Naarcha-AWS added a commit that referenced this pull request Sep 21, 2022
* Add the Kubernetes Operator install instructions

Signed-off-by: Naarcha-AWS <[email protected]>

* Copy edits

Signed-off-by: Naarcha-AWS <[email protected]>

* Add doc review

Signed-off-by: Naarcha-AWS <[email protected]>

* Add editorial

Signed-off-by: Naarcha-AWS <[email protected]>

Signed-off-by: Naarcha-AWS <[email protected]>
(cherry picked from commit a6e47e0)

Co-authored-by: Naarcha-AWS <[email protected]>
Naarcha-AWS added a commit that referenced this pull request Sep 21, 2022
* Add the Kubernetes Operator install instructions

Signed-off-by: Naarcha-AWS <[email protected]>

* Copy edits

Signed-off-by: Naarcha-AWS <[email protected]>

* Add doc review

Signed-off-by: Naarcha-AWS <[email protected]>

* Add editorial

Signed-off-by: Naarcha-AWS <[email protected]>

Signed-off-by: Naarcha-AWS <[email protected]>
(cherry picked from commit a6e47e0)

Co-authored-by: Naarcha-AWS <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 21, 2022
* Add the Kubernetes Operator install instructions

Signed-off-by: Naarcha-AWS <[email protected]>

* Copy edits

Signed-off-by: Naarcha-AWS <[email protected]>

* Add doc review

Signed-off-by: Naarcha-AWS <[email protected]>

* Add editorial

Signed-off-by: Naarcha-AWS <[email protected]>

Signed-off-by: Naarcha-AWS <[email protected]>
(cherry picked from commit a6e47e0)
Naarcha-AWS added a commit that referenced this pull request Sep 21, 2022
* Add the Kubernetes Operator install instructions

Signed-off-by: Naarcha-AWS <[email protected]>

* Copy edits

Signed-off-by: Naarcha-AWS <[email protected]>

* Add doc review

Signed-off-by: Naarcha-AWS <[email protected]>

* Add editorial

Signed-off-by: Naarcha-AWS <[email protected]>

Signed-off-by: Naarcha-AWS <[email protected]>
(cherry picked from commit a6e47e0)

Co-authored-by: Naarcha-AWS <[email protected]>
apiVersion: v1
clusters:
- cluster:
certificate-authority: /Users/naarcha/.minikube/ca.crt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you shouldn't include real paths / usernames in the documentation, it provides no added value and just causes confusion. (same applies to the other 2 places where you have your username in the example file)

1. In your preferred directory, clone the [OpenSearch Kubernetes Operator repo](https://github.com/Opster/opensearch-k8s-operator). Navigate into repo's directory using `cd`.
2. Go to the `opensearch-operator` folder.
3. Enter `make build manifests`.
4. Start a Kubernetes cluster. When using minikube, open a new terminal window and enter `minikube start`. Kubernetes will now use a containerized minikube cluster with a namespace called `default`. Make sure that `~/.kube/config` points to the cluster.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is mostly the same sentence as on line 54. maybe combine them?


After the installation completes, the operator returns information on the deployment with `STATUS: deployed`. Then you can configure and start your [OpenSearch cluster](#deploy-a-new-opensearch-cluster).

### Use a local installation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't you use the helm chart just because you're running a local minikube cluster? i think these are separate topics:

  • how you run your k8s cluster (real cluster vs. minikube)
  • how you deploy the operator (helm vs. self-built)

In order to delete the OpenSearch cluster, delete the cluster resources. The following command deletes the cluster namespace and all its resources.

```
kubectl delete -f opensearch-cluster.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this also deletes the PVCs (= the data) then you should add a big fat warning as this will be a non-reversible option with data loss (which may or may not be intentional)!


With the Kubernetes cluster running, you can now run OpenSearch inside the cluster.

## Deploy a new OpenSearch cluster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be clearly noted that these are purely examples and are not production ready (using demo TLS certificates, etc.)

The operator creates several pods, including a bootstrap pod, three OpenSearch cluster pods, and one Dashboards pod. To connect to your cluster, use the `port-forward` command.

```
kubectl port-forward svc/my-cluster-dashboards 5601
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while i hope that people using k8s are aware of this, it might be worth noting that this is only done for demo purposes; in a real setup an Ingress resource (or Route on OpenShift) must be set up to have a proper route available and not rely on port-forwarding

Naarcha-AWS added a commit that referenced this pull request Oct 6, 2022
* Add the Kubernetes Operator install instructions

Signed-off-by: Naarcha-AWS <[email protected]>

* Copy edits

Signed-off-by: Naarcha-AWS <[email protected]>

* Add doc review

Signed-off-by: Naarcha-AWS <[email protected]>

* Add editorial

Signed-off-by: Naarcha-AWS <[email protected]>

Signed-off-by: Naarcha-AWS <[email protected]>
@Naarcha-AWS Naarcha-AWS deleted the kubes-operator branch December 13, 2022 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.0 PR: Backport label for v2.0.x backport 2.1 PR: Backport label for 2.1 backport 2.2 PR: Backport label for 2.2 backport 2.3 PR: Backport label for 2.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add documentation for community-led OpenSearch Kubernetes Operator
5 participants