We have followed this tutorial to get mainflux up and running. After installing kubectl we added helm repos as follows
helm repo add stable https://charts.helm.sh/stable
helm repo add bitnami https://charts.bitnami.com/bitnami
We have installed ingress-nginx using
helm upgrade --install ingress-nginx ingress-nginx \
--repo https://kubernetes.github.io/ingress-nginx \
--namespace ingress-nginx --create-namespace
finally mainflux is installed
helm install mainflux . -n mf --set ingress.hostname='example.com' --set
influxdb.enabled=true
After that we have added the following in the ingress-nginx-contoller
kubectl edit svc -n ingress-nginx ingress-nginx-controller
- name: mqtt
port: 1883
protocol: TCP
targetPort: 1883
- name: mqtts
port: 8883
protocol: TCP
targetPort: 8883
everything seems to be up and running but when we visit example.com we see a 404 message instead of the UI, which should be running as mainflux-nginx-ingress in mf namespace points to that as shown below
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: mainflux-ui
port:
number: 3000
- path: /version
pathType: Prefix
backend:
service:
name: mainflux-things
port:
number: 8182
Ingress file created is like this
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: nginx-ingress-ingress-nginx-controller
namespace: ingress-nginx
uid: be22613c-df21-41f3-9466-eb2146ac0503
resourceVersion: '2151483'
generation: 3
creationTimestamp: '2021-12-31T11:39:08Z'
annotations:
kubectl.kubernetes.io/last-applied-configuration: >
{"apiVersion":"networking.k8s.io/v1","kind":"Ingress","metadata":{"annotations":{},"name":"nginx-ingress-ingress-nginx-controller","namespace":"ingress-nginx"},"spec":{"ingressClassName":"nginx","rules":[{"host":"aqueglobal.hopto.org","http":{"paths":[{"backend":{"service":{"name":"ingress-nginx-controller","port":{"number":80}}},"path":"/","pathType":"ImplementationSpecific"}]}}]}}
managedFields:
- manager: kubectl-client-side-apply
operation: Update
apiVersion: networking.k8s.io/v1
time: '2021-12-31T11:39:08Z'
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:kubectl.kubernetes.io/last-applied-configuration: {}
f:spec:
f:ingressClassName: {}
- manager: nginx-ingress-controller
operation: Update
apiVersion: networking.k8s.io/v1
time: '2021-12-31T11:39:33Z'
fieldsType: FieldsV1
fieldsV1:
f:status:
f:loadBalancer:
f:ingress: {}
- manager: dashboard
operation: Update
apiVersion: networking.k8s.io/v1
time: '2022-01-03T07:26:29Z'
fieldsType: FieldsV1
fieldsV1:
f:spec:
f:rules: {}
spec:
ingressClassName: nginx
rules:
- host: aqueglobal.dockerfix.ga
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: mainflux-ui
port:
number: 80
status:
loadBalancer:
ingress:
- ip: 178.128.140.136
Please let me know if you need more information on this.
Logs from ingress-nginx-controller
Release: v1.1.0
Build: cacbee86b6ccc45bde8ffc184521bed3022e7dee
Repository: https://github.com/kubernetes/ingress-nginx
nginx version: nginx/1.19.9
-------------------------------------------------------------------------------
W1229 10:42:59.968679 8 client_config.go:615] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I1229 10:42:59.969348 8 main.go:223] "Creating API client" host="https://10.245.0.1:443"
I1229 10:42:59.981189 8 main.go:267] "Running in Kubernetes cluster" major="1" minor="21" git="v1.21.5" state="clean" commit="aea7bbadd2fc0cd689de94a54e5b7b758869d691" platform="linux/amd64"
I1229 10:43:01.110865 8 main.go:104] "SSL fake certificate created" file="/etc/ingress-controller/ssl/default-fake-certificate.pem"
I1229 10:43:01.135087 8 ssl.go:531] "loading tls certificate" path="/usr/local/certificates/cert" key="/usr/local/certificates/key"
I1229 10:43:01.192917 8 nginx.go:255] "Starting NGINX Ingress controller"
I1229 10:43:01.218095 8 event.go:282] Event(v1.ObjectReference{Kind:"ConfigMap", Namespace:"ingress-nginx", Name:"ingress-nginx-controller", UID:"b79068dd-ef5b-4098-bf83-0b5b38d328e8", APIVersion:"v1", ResourceVersion:"1364193", FieldPath:""}): type: 'Normal' reason: 'CREATE' ConfigMap ingress-nginx/ingress-nginx-controller
I1229 10:43:02.300256 8 store.go:420] "Ignoring ingress because of error while validating ingress class" ingress="mf/mainflux-nginx-ingress" error="ingress does not contain a valid IngressClass"
I1229 10:43:02.300294 8 store.go:420] "Ignoring ingress because of error while validating ingress class" ingress="mf/mainflux-nginx-rewrite-ingress" error="ingress does not contain a valid IngressClass"
I1229 10:43:02.300308 8 store.go:420] "Ignoring ingress because of error while validating ingress class" ingress="mf/mainflux-nginx-rewrite-ingress-http-adapter" error="ingress does not contain a valid IngressClass"
I1229 10:43:02.300544 8 store.go:420] "Ignoring ingress because of error while validating ingress class" ingress="mf/mainflux-jaeger-operator-jaeger-query" error="ingress does not contain a valid IngressClass"
I1229 10:43:02.394534 8 nginx.go:297] "Starting NGINX process"
I1229 10:43:02.394823 8 leaderelection.go:248] attempting to acquire leader lease ingress-nginx/ingress-controller-leader...
I1229 10:43:02.395134 8 nginx.go:317] "Starting validation webhook" address=":8443" certPath="/usr/local/certificates/cert" keyPath="/usr/local/certificates/key"
I1229 10:43:02.395498 8 controller.go:155] "Configuration changes detected, backend reload required"
I1229 10:43:02.420641 8 leaderelection.go:258] successfully acquired lease ingress-nginx/ingress-controller-leader
I1229 10:43:02.420988 8 status.go:84] "New leader elected" identity="ingress-nginx-controller-54bfb9bb-h7rnk"
I1229 10:43:02.476845 8 controller.go:172] "Backend successfully reloaded"
I1229 10:43:02.477112 8 controller.go:183] "Initial sync, sleeping for 1 second"
I1229 10:43:02.477268 8 event.go:282] Event(v1.ObjectReference{Kind:"Pod", Namespace:"ingress-nginx", Name:"ingress-nginx-controller-54bfb9bb-h7rnk", UID:"a7bc7f3d-057c-48af-9cc7-ac5696e33c4e", APIVersion:"v1", ResourceVersion:"1364272", FieldPath:""}): type: 'Normal' reason: 'RELOAD' NGINX reload triggered due to a change in configuration
10.110.0.4 - - [29/Dec/2021:11:40:20 0000] "CONNECT 161.97.119.209:25562 HTTP/1.1" 400 150 "-" "-" 0 0.100 [] [] - - - - 8a665aa9190578b193cc461a2dd7c250
10.110.0.5 - - [29/Dec/2021:12:00:47 0000] "GET / HTTP/1.1" 400 650 "http://localhost:8001/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36" 461 0.000 [] [] - - - - 9392ae22b5c8f2b2af93a16105d117af
10.110.0.6 - - [29/Dec/2021:12:00:47 0000] "GET /favicon.ico HTTP/1.1" 400 650 "http://178.128.140.136:443/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36" 376 0.000 [] [] - - - - c92ed214e9bb86e0de12cf5b77d428a9
10.110.0.6 - - [29/Dec/2021:12:04:33 0000] "GET / HTTP/1.1" 400 650 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36" 454 0.000 [] [] - - - - 443edf8d2edd6a051ce07d654bb2af89
10.110.0.4 - - [29/Dec/2021:12:04:33 0000] "GET /favicon.ico HTTP/1.1" 400 650 "http://178.128.140.136:443/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36" 376 0.000 [] [] - - - - 005b2e9af113b00747166d1906906588
I1229 14:42:40.103830 8 admission.go:149] processed ingress via admission controller {testedIngressLength:1 testedIngressTime:0.039s renderingIngressLength:1 renderingIngressTime:0.001s admissionTime:14.3kBs testedConfigurationSize:0.04}
I1229 14:42:40.103862 8 main.go:101] "successfully validated configuration, accepting" ingress="mainflux-jaeger-operator-jaeger-query/mf"
10.110.0.4 - - [29/Dec/2021:17:09:23 0000] "\x16\x03\x01\x01\xFE\x01\x00\x01\xFA\x03\x03\xF0Y\x16\xD3ELt\xCCv\xFAq$\xA4V\xEA\x80\x03\x1C\xE5\xEF\x1A\x1Cy\x12\x88_\xEBam_\xF7X\x00\x01<\xCC\x14\xCC\x13\xCC\x15\xC00\xC0,\xC0(\xC0$\xC0\x14\xC0" 400 150 "-" "-" 0 0.055 [] [] - - - - 145d5cb5329de31ffe9b8ce98bcfd841
10.110.0.4 - - [29/Dec/2021:17:27:59 0000] "\x04\x01\x00\x19h/\x12\xA1\x00" 400 150 "-" "-" 0 0.002 [] [] - - - - f7b5cdff79f165cb9eb6e93a1302f32b
10.110.0.6 - - [29/Dec/2021:17:27:59 0000] "\x05\x01\x00" 400 150 "-" "-" 0 0.002 [] [] - - - - 8658dc6c8c1670df628a7a4583d4587f
10.110.0.4 - - [29/Dec/2021:17:27:59 0000] "CONNECT hotmail-com.olc.protection.outlook.com:25 HTTP/1.1" 400 150 "-" "-" 0 0.003 [] [] - - - - c119e2115f54ce2f1ef91f771e64d456
2021/12/29 18:20:58 [crit] 33#33: *252621 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 10.110.0.4, server: 0.0.0.0:443
2021/12/29 18:47:11 [crit] 33#33: *267094 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 10.110.0.5, server: 0.0.0.0:443
2021/12/29 19:37:37 [crit] 33#33: *294934 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 10.110.0.4, server: 0.0.0.0:443
2021/12/29 20:20:07 [crit] 34#34: *318401 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 10.110.0.4, server: 0.0.0.0:443
10.110.0.4 - - [29/Dec/2021:21:03:10 0000] "\x04\x01\x00PU\xCE\xA0s\x00" 400 150 "-" "-" 0 0.003 [] [] - - - - 47053e3a5c942a0ee2239ba2e4d9be8f
10.110.0.6 - - [29/Dec/2021:21:03:10 0000] "\x05\x01\x00" 400 150 "-" "-" 0 0.002 [] [] - - - - a3d70a5ff4485970e78f028aa9a827d4
10.110.0.6 - - [29/Dec/2021:21:03:10 0000] "CONNECT 85.206.160.115:80 HTTP/1.1" 400 150 "-" "-" 0 0.002 [] [] - - - - 7b4fff89c964b6865ac4f67fa897ad5d
2021/12/29 21:20:05 [crit] 34#34: *351510 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 10.110.0.6, server: 0.0.0.0:443
10.110.0.4 - - [29/Dec/2021:21:53:07 0000] "\x01\x02\x03\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 400 150 "-" "-" 0 0.212 [] [] - - - - 3e69ee8444b4410a1e841bcb9ca645e4
10.110.0.4 - - [29/Dec/2021:22:22:10 0000] "CONNECT 161.97.119.209:25562 HTTP/1.1" 400 150 "-" "-" 0 0.089 [] [] - - - - b1d0f23d0111c17bc08c92c72eb9c3a4
10.110.0.4 - - [29/Dec/2021:23:27:28 0000] "H\x00\x00\x00tj\xA8\x9E#D\x98 \xCA\xF0\xA7\xBBl\xC5\x19\xD7\x8D\xB6\x18\xEDJ\x1En\xC1\xF9xu[l\xF0E\x1D-j\xEC\xD4xL\xC9r\xC9\x15\x10u\xE0%\x86Rtg\x05fv\x86]%\xCC\x80\x0C\xE8\xCF\xAE\x00\xB5\xC0f\xC8\x8DD\xC5\x09\xF4" 400 150 "-" "-" 0 0.142 [] [] - - - - e07241ad9c169d9998fa7ef1ca46a9ac
2021/12/29 23:31:19 [crit] 33#33: *423930 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 10.110.0.6, server: 0.0.0.0:443
10.110.0.6 - - [29/Dec/2021:23:47:36 0000] "\x03\x00\x00/*\xE0\x00\x00\x00\x00\x00Cookie: mstshash=Administr" 400 150 "-" "-" 0 0.038 [] [] - - - - c1cb7bd37bf5661a79475d3700770fde
2021/12/29 23:48:00 [crit] 34#34: *433156 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 10.110.0.6, server: 0.0.0.0:443
10.110.0.5 - - [29/Dec/2021:23:58:07 0000] "\xC9\x94\xD1\xA6\xAE\x9C\x05lM/\x09\x8Cp#\xEE\x9D*5#]\xC7R:\xC8\x8E/\x11\xB8\xCD\x89Z\xFB\xA4\x19f\xD2\xCE\xB3\xA1\x81\xBB\xFC\xA0\xDD 