Skip to content

This repository contains example how to configure NGINX Ingress Controller in Docker for Mac and proxy traffic to backend service.

License

Notifications You must be signed in to change notification settings

rbiedrawa/k8s-ingress-demo

Repository files navigation

K8s Ingress Controller setup (demo)

This repository contains example how to configure NGINX Ingress Controller in Docker for Mac and proxy traffic to backend service.

Getting Started

Prerequisites

  • Java 11
  • Docker for Mac
  • Kubernetes

Installation

  • Build docker image.

    ./gradlew bootBuildImage
  • Install NGINX Ingress Controller.

    kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.45.0/deploy/static/provider/cloud/deploy.yaml
  • Check if the ingress controller pods started.

    kubectl get pods -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx --watch

Usage

  • Start skaffold in dev mode.

    skaffold dev
  • Describe ingress.

    kubectl describe ingress k8s-demo-ingress --namespace k8s-ingress-demo
  • Check if ingress is working.

    curl http://kubernetes.docker.internal/hello
  • Stop skaffold dev (CTRL + C).

  • Uninstall NGINX Ingress Controller.

    kubectl delete all --all -n ingress-nginx
    kubectl delete ns ingress-nginx

References

License

Distributed under the MIT License. See LICENSE for more information.

About

This repository contains example how to configure NGINX Ingress Controller in Docker for Mac and proxy traffic to backend service.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages