Skip to content

Custom operator for Kubernetes

License

Notifications You must be signed in to change notification settings

m-wrona/k8s-operator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8s-operator

Custom mem-cached operator for Kubernetes.

An Operator is a method of packaging, deploying and managing a Kubernetes application.

A Kubernetes application is an application that is both deployed on Kubernetes and managed using the Kubernetes APIs and kubectl tooling.

Pre-requisites:

Development

Local development

  1. Set the name of the operator in an environment variable
export OPERATOR_NAME=memcached-operator
  1. Run locally
operator-sdk up local --namespace=default

Build

  1. Regenerate K8s related code
operator-sdk generate k8s

Docker

  1. Docker build
operator-sdk build mwrona/k8s-memcached-operator:v0.0.1
  1. Docker push
docker push mwrona/k8s-memcached-operator:v0.0.1

Kubernetes

  1. Deploy K8s operator
kubectl create -f deploy/crds/cache_v1alpha1_memcached_crd.yaml
kubectl create -f deploy/service_account.yaml
kubectl create -f deploy/role.yaml
kubectl create -f deploy/role_binding.yaml
kubectl create -f deploy/operator.yaml
  1. Create mem-cached
kubectl apply -f deploy/crds/cache_v1alpha1_memcached_cr.yaml
  1. Check mem-cached status
kubectl get memcached/example-memcached -o yaml

Doc

About

Custom operator for Kubernetes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published