Giter Site home page Giter Site logo

memcached-operator's Introduction

Memcached-Operator

  • This is an Memcached-Operator (CRD+controller) using kubebuilder framework.
  • It provisions Memcached pods replicas and created a service to access them.

Overview

  • Kubernetes Controller: A controller is a loop that reads desired state(spec), observed cluster state (status) and external state and the reconciles cluster state and external state with the desired state, writing any observations down (to our own status).
  • Custom Resource definition(CRD): Defines a custom resource which is not available in default kubernetes implementation.
  • Groups,Versions and kinds:
    • A API group is a collection of related API types.
    • We call each API type a kind.
  • API YAML: It consists of Metadata + Spec + Status + List
    • Metadata holds name/namespace etc.
    • Spec holds desired state.
    • Status holds observed state.
    • List holds many objects.

example:

apiVersion: v1
kind: Pod
metadata:
  name: my-app
  namespace: default
  ...
  ...
spec:
  containers:
  - args: [sh]
    image: gcr.io/bowei-gke/udptest
    imagePullPolicy: Always
    name: client
    ...
  dnsPolicy: ClusterFirst
  ...
  ...
status:
  podIP: 10.8.3.11
  ...
  ...

How to run

  1. Generate CRD and install the CRD
$make manifests
$kubectl apply -f config/crd/bases/cache.example.com_memcacheds.yaml
  1. Apply the sample
$kubectl apply -f config/samples/cache_v1_memcached.yaml
  1. To start the controller
$make run

memcached-operator's People

Contributors

ishan16696 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.