Wednesday, September 25, 2024
HOW TO DEPLOY NGINX INGRESS CONTROLLER IN
KUBERNATES USING HELM
Prerequisites:
1.
2.
An active Kubernates cluster
Helm Install on the cluster
Steps
1.
Add the nginx ingress controller helm chart
# helm repo add ingress-nginx
https://kubernetes.github.io/ingress-nginx
2.
Update the helm repo
# helm repo update ingress-nginx
3.
#
Helm search repo for chats
helm search repo nginx
4.
Helm show values
# helm show values nginx/ingress-nginx
5.
Create a namespace for the nginx
deployment
# kubectl create ns nginx
6.
Deploy the nginx ingress controller
# helm install [releasename] [charname] -n
[namespace]
#
helm install nginx nginx/ingress-nginx -n
nginx
7. Nginx ingress controller deploy with service type
loadbalncer by default
# kubectl get svc -n nginx
8. Whenever Nginx ingress controller is deployed
with service type loadBalancer , it means that all
other application would then be deployed with
service type clusterIP.
How to Deploy Applications and Link them up with
Nginx Ingress controller
In this section we are going to deploy a social media nextcloud using helm
Follow the steps
1.
In our cluster - create helm chart
# helm create [chart name]
# helm create nextcloud
2. Edit the values.yaml file
a.Update the service type = ClusterIP
b. Imae repository =
c. Image Tag
=
3. Create a namespace called apps
# kubectl create ns apps
4. Install the nextcloud into the cluster in the apps
namespace
# helm install nextcloud nextcloud -n apps
CONFIGURING FULL QUALIFIED DOMAIN WITH ROUTE
V53
Requirements:
1. LOADBALANCER URL:
a-a22cc4371bc6c88cb5a-.us-west-2.elb.amazonaws.com
2. Domain name: liontechexpo.com
3. Create an A record mapping the loadbalancer
url to the service . [
nextcloudapp.liontechexpo.com
4. Follow the video to create your ingress and link
the subdomain the service and define your ingress
class = nginx
APPLICATION # 2:
DEPLOY SONARQUBE WITH SERVICE TYPE CLUSTERIP
Details for the app:
Image repository = liontechacademy/apps
Image Tag : sonarqube-v1.0.1
Expose =
9000
STEPS:
1.
CREATE A HELM CHART
# helm create sonarqube
2.
3.
4.
Update the values.yaml file
Install the chart
Configure suddomain
5.
6.
Create ingress
Link ingress to the ingress class
3. Deploy sonartype Nexus in Kubernates using
helm
# create a nextus helm charts
# helm create nexus
a.Edit the values.yaml file as seen in the video