Expose Spring Boot Micro Service Via NGINX ingress controller on Kubernetes Cluster
You will learn how to integrate spring boot with NGINX ingress controller on Kubernetes Cluster.
——————————————————————————————————————————
To install Nginx-ingress, apply the below commands
helm search nginx-ingress
Helm install stable/nginx-ingress –name=my-nginx –set rbc.create=true
——————————————————————————————————————————
MetalLB Installation: https://metallb.universe.tf/installation/
Installation By Manifest
To install MetalLB, apply the manifest:
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.3/manifests/namespace.yaml
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.3/manifests/metallb.yaml
# On first install only
kubectl create secret generic -n metallb-system memberlist –from-literal=secretkey=”$(openssl rand -base64 128)”
The installation manifest does not include a configuration file. MetalLB’s components will still start, but will remain idle until you define and deploy a configmap.
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
– name: default
protocol: layer2
addresses:
– 192.168.1.240-192.168.1.250
———————————————————————————————————————————
apiVersion: networking.k8s.io/v1beta1 # for versions before 1.14 use extensions/v1beta1
kind: Ingress
metadata:
name: example-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
– host: springboot-ingress-k8s.info
http:
paths:
– path: /
backend:
serviceName: springboot-postgres-k8s
servicePort: 8080
————————–
My Top Playlists:
Spring Boot with Angular : https://youtube.com/playlist?list=PL4TnYdea-xTLI6sC-K78PprPMD0RljCYh
Spring Boot with Docker & Docker Compose : https://youtube.com/playlist?list=PL4TnYdea-xTJ35eW6UbWAROBIp3KENejp
Spring Boot with Kubernetes : https://youtube.com/playlist?list=PL4TnYdea-xTJ-aXZ2_ZcV27ah4KNgS-uR
Spring Boot with AWS : https://youtube.com/playlist?list=PL4TnYdea-xTJpaL2XigZ2ulcPyoRPjHAI
Spring Boot with Azure : https://youtube.com/playlist?list=PL4TnYdea-xTKqVwGI09Vm8jX9JA1QEAh8
Spring Data with Redis : https://youtube.com/playlist?list=PL4TnYdea-xTI6N9GNvod1NDB_jUs5OMoO
Spring Boot with Apache Kafka : https://youtube.com/playlist?list=PL4TnYdea-xTI-vUWgIoaDQOpC4PlK31md
Spring Boot with Resilience4J : https://youtube.com/playlist?list=PL4TnYdea-xTLGklgQfWW8ZgpQXm8-FOHt