Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 2.19 KB

install-upgrade.md

File metadata and controls

60 lines (45 loc) · 2.19 KB

Install and Upgrade the Community Kubernetes Operator

Table of Contents

Install the Operator

Prerequisites

Before you install the MongoDB Community Kubernetes Operator, you must:

  1. Install kubectl.
  2. Have a Kubernetes solution available to use. If you need a Kubernetes solution, see the Kubernetes documentation on picking the right solution. For testing, MongoDB recommends Kind.
  3. Clone this repository.
    git clone https://github.com/mongodb/mongodb-kubernetes-operator.git
    

Procedure

The MongoDB Community Kubernetes Operator is a Custom Resource Definition and a controller.

To install the MongoDB Community Kubernetes Operator:

  1. Change to the directory in which you cloned the repository.

  2. Install the Custom Resource Definitions.

    a. Invoke the following kubectl command:

    kubectl create -f deploy/crds/mongodb.com_mongodb_crd.yaml
    

    b. Verify that the Custom Resource Definitions installed successfully:

    kubectl get crd/mongodb.mongodb.com
    
  3. Install the Operator.

    a. Invoke the following kubectl command to install the Operator in the specified namespace:

    kubectl create -f deploy/ --namespace <my-namespace>
    

    b. Verify that the Operator installed successsfully:

    kubectl get pods --namespace <my-namespace>
    

Upgrade the Operator

To upgrade the MongoDB Community Kubernetes Operator:

  1. Change to the directory in which you cloned the repository.
  2. Invoke the following kubectl command to upgrade the Custom Resource Definitions.
    kubectl apply -f deploy/crds/mongodb.com_mongodb_crd.yaml