Coder Social home page Coder Social logo

chicagobuss / microk8s-ingress-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kendricktan/microk8s-ingress-example

0.0 0.0 0.0 7 KB

updating example for newer k8s apis

Home Page: https://kndrck.co/posts/microk8s_ingress_example/

JavaScript 81.35% Dockerfile 18.65%

microk8s-ingress-example's Introduction

microk8s-ingress-example

Microk8s ingress example - taken from here (github) and updated to work with k8s as of 2024/03

Steps

  1. Install MicroK8s

Microk8s quickstart link

sudo snap install microk8s --classic
microk8s.start
  1. Install Ingress Dependent Resources
microk8s.kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml
  1. Enable Ingress Addon
microk8s.enable ingress
  1. Run a local Docker Registry

You can skip this step if you wanna host your image on a public/private repository.

docker run -p 5000:5000 registry
  1. Clone Example Repository And Build Docker Image
git clone https://github.com/chicagobuss/microk8s-ingress-example
cd microk8s-ingress-example

docker build . -t my-microk8s-app
docker tag my-microk8s-app localhost:5000/my-microk8s-app
docker push localhost:5000/my-microk8s-app
  1. Run Applications And Ingress
microk8s.kubectl apply -f bar-deployment.yml
microk8s.kubectl apply -f foo-deployment.yml
microk8s.kubectl apply -f ingress.yml
  1. Expose Deployments to Ingress

If you skip this step you'll get a 503 service unavailable

microk8s.kubectl expose deployment foo-app --type=LoadBalancer --port=8080
microk8s.kubectl expose deployment bar-app --type=LoadBalancer --port=8080
  1. Testing Endpoint Out
curl -kL https://127.0.0.1/bar
curl -kL https://127.0.0.1/foo

microk8s-ingress-example's People

Contributors

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