Prerequisites¶
- Kubernetes Cluster: You should have a running Kubernetes cluster. You can use any cloud-based or on-premises Kubernetes distribution.
- kubectl: Installed and configured to interact with your Kubernetes cluster.
- Helm: Installed for managing Kubernetes applications.
- Prometheus: You should have a prometheus installed in your cluster.
Installing Prometheus
We will setup a sample prometheus to read metrics from the ingress controller.
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
helm install kube-prometheus-stack prometheus-community/kube-prometheus-stack \
--namespace monitoring \
--create-namespace \
--set alertmanager.enabled=false \
--set grafana.enabled=false \
--set prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false
- Ingress Controller: You should have an ingress controller installed in your cluster.
Installing Ingress Controller
# Download the latest Istio release from the official Istio website.
curl -L https://istio.io/downloadIstio | sh -
# Move it to home directory
mv istio-x.xx.x ~/.istioctl
export PATH=$HOME/.istioctl/bin:$PATH
istioctl install --set profile=default -y
# Label the namespace where you want to deploy your application to enable Istio sidecar Injection
kubectl create namespace <NAMESPACE>
kubectl label namespace <NAMESPACE> istio-injection=enabled
# Create a gateway
kubectl apply -f ./playground/config/gateway.yaml -n <NAMESPACE>
- KEDA: [Optional] You can have a KEDA installed in your cluster, else HPA can be used.