Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
== HTTP application routing in Azure:
The HTTP application routing add-on is designed to let you quickly create an ingress controller and access your applications.
This add-on is not currently designed for use in a production environment and is not recommended for production use.

Following steps to enable HTTP application routing.

. Enable HTTP routing on existing AKS cluster using the `az aks enable-addons` with the Azure CLI

az aks enable-addons --resource-group myResourceGroup --name myAKSCluster --addons http_application_routing


. use the `az aks show` command to retrieve the DNS zone name.

az aks show --resource-group myResourceGroup --name myAKSCluster --query addonProfiles.httpApplicationRouting.config.HTTPApplicationRoutingZoneName -o table

. Adding annotations

annotations:
kubernetes.io/ingress.class: addon-http-application-routing

. Change your ingress host with http application DNS Zone name.

host: xxxxx.xxxxxx.xxxx.region.aksapp.io

== Nginx-ingress-controller-setup:

Install Nginx ingress controller in kubernetes cluster by using helm chart.

* Adding the Helm repository, if you’re installing the chart via the helm repository.

helm repo add bitnami https://charts.bitnami.com/bitnami

* Upgrading the Chart

helm repo update

* Nginx-ingress controller: Installing the Helm charts deploy the nginx ingress controller with the following command.

helm install nginx-ingress bitnami/nginx-ingress-controller --set ingressClassResource.default=true --set containerSecurityContext.allowPrivilegeEscalation=false --namespace nginx-ingress --create-namespace

== Create multiple nginx controller service for multi domain access.

1. Import already existed nginx controller service in to yaml, modify service name and re-deploy service.

kubectl get svc nginx-ingress-nginx-ingress-controller -n nginx-ingress -o yaml > filename.yml

Note: In Azure create Public IP addresses(domain) for nginx ingress service external IP.

2. Redeploy service with minor changes.

kubectl apply -f nginx_controller_service.yml -n nginx-ingress

3. Setup ingress host with nginx ingress controller service domain to access application using domain.

host: xxx.xxx.xx.com

deploy and access application using domain.

== Examples
=== Providing Dynamic Values to Helm chart
When installing Helm charts with the helm install command, the `--set` argument allows you to define value in a values.yaml file, `application.cloud` is deployment environment(AZURE), `ingress.host` is to set host value.

helm install otlp ./helm --set application.cloud="AZURE" --set ingress.host="xxx.com"

14 changes: 14 additions & 0 deletions solutions/monitoring_openTelemetry/helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{/*
Prepare ingress host, pass it as parameter.
*/}}
{{- define "ingress.application.host" -}}
{{- printf "application.%s" .Values.ingress.host -}}
{{- end -}}

{{- define "ingress.jaeger.host" -}}
{{- printf "jaeger.%s" .Values.ingress.host -}}
{{- end -}}

{{- define "ingress.grafana.host" -}}
{{- printf "grafana.%s" .Values.ingress.host -}}
{{- end -}}
15 changes: 11 additions & 4 deletions solutions/monitoring_openTelemetry/helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress
annotations:
{{- if contains $.Values.application.cloud "AWS" }}
{{ toYaml .Values.ingress.aws.annotations | indent 2 }}
{{- end }}
{{- if contains $.Values.application.cloud "AZURE" }}
{{ toYaml .Values.ingress.azure.annotations | indent 2 }}
{{- end }}
spec:
rules:
- host: {{ .Values.ingress.application.host }}
- host: {{ template "ingress.application.host" . }}
http:
paths:
- path: "/"
Expand All @@ -14,7 +21,7 @@ spec:
name: {{ .Values.application.service.name }}
port:
number: {{ .Values.ingress.application.port }}
- host: {{ .Values.ingress.jaeger.host }}
- host: {{ template "ingress.jaeger.host" . }}
http:
paths:
- path: "/"
Expand All @@ -24,7 +31,7 @@ spec:
name: jaeger-all-in-one
port:
number: {{ .Values.ingress.jaeger.port }}
- host: {{ .Values.ingress.grafana.host }}
- host: {{ template "ingress.grafana.host" . }}
http:
paths:
- path: "/"
Expand All @@ -33,4 +40,4 @@ spec:
service:
name: grafana
port:
number: {{ .Values.ingress.grafana.port }}
number: {{ .Values.ingress.grafana.port }}
14 changes: 10 additions & 4 deletions solutions/monitoring_openTelemetry/helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Application configuration
application:
cloud: "" # AWS or AZURE
# Configuration to get the metrics information
metrics:
jobname: "metrics-jobname"
Expand All @@ -12,12 +13,17 @@ application:

# Ingress configuration
ingress:
aws:
annotations: {}
azure:
annotations: {
kubernetes.io/ingress.class: addon-http-application-routing
}
# hostname should be passed on helm install
host: ""
application:
host: "application.localhost"
port: 8080
jaeger:
host: "jaeger.localhost"
port: 16686
grafana:
host: "grafana.localhost"
port: 3000
port: 3000