A Controller written in kubernetes sample-controller style which watches a custom resource named Bookstore

bookstore-sample-controller

A Controller written in kubernetes sample-controller style which watches a custom resource named Bookstore. A resource create a deployment and a NodePort service. The container image is a simple bookstore api server. The NodePort service listen to request on host port 30000.

How to Use

Clone repo and move to directory

https://github.com/Shaad7/bookstore-sample-controller
cd bookstore-sample-controller

Create a kind cluster

kind create cluster --config=clusterconfig.yaml 

Create bookstores.gopher.com Custom Resource Definition (CRD)

kubectl apply -f artifacts/gopher.com_bookstore-status-subresource.yaml

Build and Run the controller

 go build -o bin/bookstore-controller .
 ./bin/bookstore-controller -kubeconfig=$HOME/.kube/config 

Create Custom Resource

kubectl apply -f artifacts/sample-bookstore.yaml 

Now the bookstore api server listens and serves to host port 30000. To get list of the books

curl http://localhost:30000

All the API calls from this list can be done on http://localhost:30000 instead of http://localhost:8081

Owner
Abdullah Al Shaad
Software Engineer at AppsCode Inc
Abdullah Al Shaad
Similar Resources

Kubectl-over-env - Created for github actions or any other CI/CD-Pipelining tool which cannot push to a custom local kubernetes cluster

kubectl-over-env This repository was created for github actions or any other CI/

Jan 4, 2022

A kubernetes operator sample generated by kubebuilder , which run cmd in pod on specified time

init kubebuilder init --domain github.com --repo github.com/tonyshanc/sample-operator-v2 kubebuilder create api --group sample --version v1 --kind At

Jan 25, 2022

Terraform Controller manages the life cycles of a terraform resource, allowing developers to self-serve dependencies in a controlled manner.

Terraform Controller manages the life cycles of a terraform resource, allowing developers to self-serve dependencies in a controlled manner.

TERRAFORM CONTROLLER Terraform Controller manages the life cycles of a terraform resource, allowing developers to self-serve dependencies in a control

Dec 15, 2022

EdgeDB-Golang-Docker-Sample - The sample of connection between EdgeDB Server and Go Echo API Server

EdgeDB Golang Docker Sample 『Go + Docker Composeを使ってEdgeDBを動かしてみた』のサンプルコードです。 使い

Nov 2, 2022

Watches for zips and unzips them

unziploc Watches for zips/tars/rars and unzips them Options: PATHS = /data #Comma seperated list of paths to watch WRITE_DELAY = 1m #How long to wait

Nov 28, 2021

A long-running Go program that watches a Youtube playlist for new videos, and downloads them using yt-dlp or other preferred tool.

ytdlwatch A long-running Go program that watches a Youtube playlist for new videos, and downloads them using yt-dlp or other preferred tool. Ideal for

Jul 25, 2022

Ejemplo de un k8s custom controller para un CRD nuevo

Clonado de kubernetes/sample-controller Para pruebas de un CRD nuevo This repository implements a simple controller for watching Foo resources as defi

Nov 3, 2021

Develop sample controller step by step

Develop sample controller step by step

Jul 21, 2022

Knative Sample Controller

Knative Sample Controller Knative sample-controller defines a few simple resources that are validated by webhook and managed by a controller to demons

Jan 21, 2022
A kubernetes controller that watches the Deployments and “caches” the images
A kubernetes controller that watches the Deployments and “caches” the images

image-cloner This is just an exercise. It's a kubernetes controller that watches

Dec 20, 2021
cluster-api-state-metrics (CASM) is a service that listens to the Kubernetes API server and generates metrics about the state of custom resource objects related of Kubernetes Cluster API.

Overview cluster-api-state-metrics (CASM) is a service that listens to the Kubernetes API server and generates metrics about the state of custom resou

Oct 27, 2022
OpenDILab RL Kubernetes Custom Resource and Operator Lib

DI Orchestrator DI Orchestrator is designed to manage DI (Decision Intelligence) jobs using Kubernetes Custom Resource and Operator. Prerequisites A w

Jan 5, 2023
A high performance online bookstore system.

HPOB 高性能网上书店 A high performance online bookstore system. Introduction 介绍 一个基于Gin、gorm、viper、zap等库的web服务器,实现了网上书店相关接口。 Summary 概要 使用go语言编写的,基于gin、gorm、

Apr 27, 2022
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)

Terraform Provider for Azure (Resource Manager) Version 2.x of the AzureRM Provider requires Terraform 0.12.x and later, but 1.0 is recommended. Terra

Oct 16, 2021
Apachedist-resource - A concourse resource to track updates of an apache distribution, e.g. tomcat

Apache Distribution Resource A concourse resource that can track information abo

Feb 2, 2022
A kubernetes operator demo generated by code-generator, it only watches cr's events

intro a small operator demo which only watches car cr's events. environment: ubuntu-20.04-amd64 k3s-1.21 docker-20.10.7 go-1.17 tools code-generator d

Dec 13, 2021
Crane (FinOps Crane) is an opensource project which manages cloud resource on Kubernetes stack, it is inspired by FinOps concepts.
Crane (FinOps Crane) is an opensource project which manages cloud resource on Kubernetes stack, it is inspired by FinOps concepts.

Crane (FinOps Crane) is an opensource project which manages cloud resource on Kubernetes stack, it is inspired by FinOps concepts. Goal of Crane is to provide an one-stop shop project to help Kubernetes users to save cloud resource usage with a rich set of functionalities.

Jan 3, 2023
An operator which complements grafana-operator for custom features which are not feasible to be merged into core operator

Grafana Complementary Operator A grafana which complements grafana-operator for custom features which are not feasible to be merged into core operator

Aug 16, 2022
Image clone controller is a kubernetes controller to safe guard against the risk of container images disappearing

Image clone controller image clone controller is a kubernetes controller to safe guard against the risk of container images disappearing from public r

Oct 10, 2021