Giter Club home page Giter Club logo

fdb-kubernetes-operator's Introduction

Overview

Go Report Card GitHub CI for master branch

This project provides an experimental operator for managing FoundationDB clusters on Kubernetes.

Running the Operator

To run the operator in your environment, you need to install the controller and the CRDs:

kubectl apply -f https://raw.githubusercontent.com/FoundationDB/fdb-kubernetes-operator/master/config/crd/bases/apps.foundationdb.org_foundationdbclusters.yaml
kubectl apply -f https://raw.githubusercontent.com/FoundationDB/fdb-kubernetes-operator/master/config/crd/bases/apps.foundationdb.org_foundationdbbackups.yaml
kubectl apply -f https://raw.githubusercontent.com/FoundationDB/fdb-kubernetes-operator/master/config/crd/bases/apps.foundationdb.org_foundationdbrestores.yaml
kubectl apply -f https://raw.githubusercontent.com/foundationdb/fdb-kubernetes-operator/master/config/samples/deployment.yaml

At that point, you can set up a sample cluster:

kubectl apply -f https://raw.githubusercontent.com/foundationdb/fdb-kubernetes-operator/master/config/samples/cluster.yaml

You can see logs from the operator by running kubectl logs -f -l app=fdb-kubernetes-operator-controller-manager --container=manager. To determine whether the reconciliation has completed, you can run kubectl get foundationdbcluster my-cluster. This will show the latest generation of the spec and the last reconciled generation of the spec. Once reconciliation has completed, these values will be the same.

Once the reconciliation is complete, you can run kubectl exec -it my-cluster-log-1 -- fdbcli to open up a CLI on your cluster.

You can also browse the sample directory for more examples of different resource configurations.

For more information about using the operator, including detailed discussion of how to customize your deployments, see the user manual.

For more information on version compatibility, see our compatibility guide.

For more information on the fields you can define on the cluster resource, see the API documentation.

Local Development

Environment Set-up

  1. Install GO on your machine, see the Getting Started guide for more information.
  2. Install KubeBuilder and its dependencies on your machine, see The KubeBuilder Book for more information (currently version 2.3.2 is used).
  3. Set your $GOPATH, e.x. /Users/me/Code/go.
  4. Install kustomize.
  5. Install the foundationDB client package.
  6. If you want to modify the manifests you currently need yq, we use the v4.6.1 version.

Running Locally

To get this controller running in a local Kubernetes cluster:

  1. Change your current directory to $GOPATH/src/github.com using the command cd $GOPATH/src/github.com and run mkdir foundationdb to create the directory foundationdb.
  2. CD into the newly created directory and clone this github repo inside $GOPATH/src/github.com/foundationdb.
  3. Run config/test-certs/generate_secrets.bash to set up a secret with self-signed test certs.
  4. Run make rebuild-operator to install the operator.
  5. Run kubectl apply -k ./config/tests/base to create a new FoundationDB cluster with the operator.

Running locally with nerdctl

Instead of Docker you can also use nerdctl to build and push your images. In order to use a different image builder than docker you can use the env variable BUILDER:

# This will use nerdctl for building the image in the k8s.io namespace
export BUILDER='nerdctl -n k8s.io'

You can test your setup with SKIP_TEST=1 make container-build which will build the image locally. After the command successfully finished you can verify with nerdctl -n k8s.io images fdb-kubernetes-operator:latest that the image is available.

fdb-kubernetes-operator's People

Contributors

brownleej avatar johscheuer avatar joshuamcmanus avatar funkypenguin avatar akshaychitneni avatar 09harsh avatar viveksinghggits avatar rbtcollins avatar jkylling avatar renxuanw avatar annigerishambu avatar pierrez avatar sears avatar ammolitor avatar benzim avatar apkar avatar daniel-b-smith avatar deviouslab avatar eladdolev avatar etschannen avatar simenl avatar maxmcd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.