express

command module
v0.0.0-...-a52e63f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2022 License: BSD-3-Clause Imports: 19 Imported by: 0

README ΒΆ

Express - Expose Ingress Custom k8s Controller


πŸ“ Table of Contents

🧐 About

The Express custom kubernetes controller is written primarily in go lang. This controller explicitly keeps a watch on newly created Deployments in all Namespaces,
And as soon as a new Deployment is created, our controller will create a Service and an Ingress for it and expose it to the outer world.

🏁 Getting Started

These instructions will get you the project up and running on your local machine for development and testing purposes. See Running the Code for notes on how to deploy the project on a Local System or on a Kubernetes Server.

Prerequisites

To run the Express Controller on Local System, first we need to install following Software Dependencies.

Once above Dependencies are installed we can move with further steps

Installing

A step by step series of examples that tell you how to get a development env running.

Step 1: Running a 2 Node Mock Kubernetes Server Locally using minikube
minikube start --nodes 2 -p k8s-cluster
Step 2: Enabling ingress in minikube
minikube addons enable ingress -p k8s-cluster
Step 3: Setting Up Environmental Variables

Set up the Environmental variables according to your needs. The Application will run with defaults as mentioned in the following table

Environmental Variable Usage Default Values
EXPRESS_QUEUE Queue for holding interface objects EXPRESS

πŸ”§ Running the Code

To Run the Express Controller on local machine, Open a terminal in the Project and run following command

go build
./express

To Run the Express Controller inside k8s cluster, follow the below steps

  1. Create the Role having permissions to list, create, edit and delete the resources in all namespaces
kubectl create role allowAll --resource deployments,pods,services,ingresses --verb list,create,delete
  1. Create Role Binding of above role with the default service account
kubectl create rolebinding allowAll --role allowAll --serviceaccount default:default
  1. Create Namespace
kubectl create namespace express
  1. Deploy the Controller with the Manifest File
kubectl create -f express.yaml

✍️ Authors

πŸŽ‰ Acknowledgements

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL