It doesn't feel like here is the best place to address this, as it will require more troubleshooting specify to Azure DevOps. For a specialized assistance on Azure DevOps question, kindly just re-post your question on Developer Communityto receive insights from the targetted SMEs/audience. When posting I will suggest you share logs of your pipeline run and if possible your azure-pipeline.yaml file.
Deploy Grafana and Prometheus to AKS via Azure DevOps Pipeline
Chidiebere Ugwu
25
Reputation points
I want to pull an app image from Azure container registry to AKS and install Grafana and Prometheus to AKS cluster via Azure DevOps pipeline using the code snippet below:
apiVersion: apps/v1
kind: Deployment
metadata:
name: schon-app
spec:
replicas: 2
selector:
matchLabels:
app: schon-app
template:
metadata:
labels:
app: schon-app
spec:
containers:
- name: schon-klinik-app
image: xxxxxxx.azurecr.io/schonapp:sck
ports:
- containerPort: 5000
---
apiVersion: v1
kind: Service
metadata:
name: schon-app-svc
spec:
selector:
app: schon-app
ports:
- protocol: TCP
port: 5000
targetPort: 5000
type: LoadBalancer
---
#Prometheus deployment
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: prom
labels:
app: prom
spec:
selector:
matchLabels:
app: prom
strategy:
type: Recreate
template:
metadata:
labels:
app: prom
spec:
containers:
- name: prom
image: prom/prometheus
ports:
- containerPort: 9090
#Expose prometheus
---
apiVersion: v1
kind: Service
metadata:
name: prom
labels:
app: prom
spec:
selector:
app: prom
ports:
- protocol: TCP
port: 9090
targetPort: 9090
type: LoadBalancer
#Grafana deployment
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
labels:
app: grafana
spec:
selector:
matchLabels:
app: grafana
strategy:
type: Recreate
template:
metadata:
labels:
app: grafana
spec:
containers:
- name: grafana
image: grafana/grafana
ports:
- containerPort: 3000
#Expose Grafana
---
apiVersion: v1
kind: Service
metadata:
name: grafana
labels:
app: grafana
spec:
selector:
app: grafana
ports:
- protocol: TCP
port: 3000
targetPort: 3000
type: LoadBalancer
But I keep getting the error as seen below:
need help with any suggestion or sample script to achieve that especially the Grafana and Prometheus aspect as the app deploys well if I remove the Grafana and Prometheus side.