Skip to content

NoahAmethyst/simple-kube-operator

Repository files navigation

Simple Kubernetes Operator

This project only for personal use and study so it's not professional.

I'm happy if you contribute to this repo.

You can figure out how to use in gotest

This project can be coordinated with this git action

Features

  • Server with grpc
  • Get all namespaces
  • Get all pods with specific namespace
  • Get all services with specific namespace
  • Get all deployments with specific namespace
  • Delete specific pod
  • Event monitoring
  • Notifier when pod status changed.

Use

Directly

# Your GRPC server port
# Default is 9090 if not set
export  GRPC_LISTEN_PORT=

# Kubernetes Master Url
# Optional
export K8S_MASTER_URL=

# Kubernetes Config File Path 
# Default is '/etc/kubernetes/admin.conf'
export K8S_CONFIG_FILE=

go build -o kube-operator

./kube-operator

Docker

# Please make sure your Kubernetes configuration file is mounted in the specified directory. 
# The default directory can be found in [Directly format]
# And you can also customize it by adjusting the environment variables of the Docker container.
docker run --name msr_http kube-operator -d registry.cn-hangzhou.aliyuncs.com/lexmargin/kube-operator:latest

By Kubernetes

# You may want to adjust the env value or node port by your self
kubectl apply -f https://github.com/NoahAmethyst/simple-kube-operator/blob/master/kube_operator.yml

About

Grpc server for simple kubernetes operator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published