I'm a beginner to Kubernetes, Helm and Yaml. I'm trying to access the QuestDB Console via Kubernetes Ingress Controller setup in my minikube, but i'm getting the below error when running a helm upgrade. Could anyone advice how I can correct this?
Error: UPGRADE FAILED: failed to create resource: Ingress.extensions "questdb" is invalid: spec: Invalid value: []networking.IngressRule(nil): either `defaultBackend` or `rules` must be specified
Here's my overriding value.yaml
ingress:
enabled: true
rules:
- host: localhost
http:
paths:
- path: /questdb
backend:
serviceName: questdb-headless
servicePort: 9000
- path: /influxdb
backend:
serviceName: questdb-headless
servicePort: 9009
I've installed the QuestDB helm chart using a local version which has only slightly modified the original ingress.yaml to reference networking.k8s.io/v1 instead of networking.k8s.io/v1beta1. Here's what it is locally:
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "questdb.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else -}}
apiVersion: extensions/v1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "questdb.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ . }}
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
I'm running on these versions:
- helm : v3.6.0
- Kubernetes :
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:23:52Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-13T13:20:00Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
NAME NAMESPACE CHART APP VERSION
kubernetes-ingress default kubernetes-ingress-1.15.2 1.6.2
questdb default questdb-0.8.0 6.0.3
More details on the original chart and templates can be found here: https://github.com/questdb/questdb-kubernetes/tree/master/charts/questdb