带有 ingress-nginx 的 Kubernetes 上的 Mainflux

Mainflux on Kubernetes with ingress-nginx

我们已按照 this 教程启动 mainflux 并 运行。安装kubectl后我们添加helm repos如下

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

我们已经使用

安装了 ingress-nginx
    helm upgrade --install ingress-nginx ingress-nginx \
  --repo https://kubernetes.github.io/ingress-nginx \
  --namespace ingress-nginx --create-namespace

mainflux 终于安装好了

helm install mainflux . -n mf --set ingress.hostname='example.com' --set 
influxdb.enabled=true

之后我们在 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

一切似乎都正常 运行 但是当我们访问 example.com 时,我们看到一条 404 消息而不是 UI,它应该是 运行 作为 mainflux- mf 命名空间中的 nginx-ingress 指向如下所示

 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

创建的入口文件是这样的

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

如果您需要这方面的更多信息,请告诉我。

来自 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%d1\x17\xA6%n\xC5" 400 150 "-" "-" 0 0.042 [] [] - - - - 25e4cb81e83b0cdaaa06570e63bdf694
10.110.0.6 - - [29/Dec/2021:23:58:07 +0000] "\x10 \x00\x00BBBB\xBA\x8C\xC1\xABDAAA" 400 150 "-" "-" 0 0.035 [] [] - - - - 426506f8a90e477fe94f2ffcc8183c97
I1230 00:42:40.103254 8 admission.go:149] processed ingress via admission controller {testedIngressLength:1 testedIngressTime:0.046s renderingIngressLength:1 renderingIngressTime:0s admissionTime:14.3kBs testedConfigurationSize:0.046}
I1230 00:42:40.103476 8 main.go:101] "successfully validated configuration, accepting" ingress="mainflux-jaeger-operator-jaeger-query/mf"
E1230 00:48:27.313265 8 leaderelection.go:330] error retrieving resource lock ingress-nginx/ingress-controller-leader: etcdserver: request timed out
I1230 00:48:34.204268 8 leaderelection.go:283] failed to renew lease ingress-nginx/ingress-controller-leader: timed out waiting for the condition
I1230 00:48:34.204406 8 leaderelection.go:248] attempting to acquire leader lease ingress-nginx/ingress-controller-leader...
E1230 00:48:41.310746 8 leaderelection.go:330] error retrieving resource lock ingress-nginx/ingress-controller-leader: etcdserver: request timed out
I1230 00:48:50.241126 8 leaderelection.go:258] successfully acquired lease ingress-nginx/ingress-controller-leader
2021/12/30 01:44:38 [crit] 33#33: *497526 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 - - [30/Dec/2021:02:09:49 +0000] "145.ll|'|'|SGFjS2VkX0Q0OTkwNjI3|'|'|WIN-JNAPIER0859|'|'|JNapier|'|'|19-02-01|'|'||'|'|Win 7 Professional SP1 x64|'|'|No|'|'|0.7d|'|'|..|'|'|AA==|'|'|112.inf|'|'|SGFjS2VkDQoxOTIuMTY4LjkyLjIyMjo1NTUyDQpEZXNrdG9wDQpjbGllbnRhLmV4ZQ0KRmFsc2UNCkZhbHNlDQpUcnVlDQpGYWxzZQ==12.act|'|'|AA==" 400 150 "-" "-" 0 0.141 [] [] - - - - e40974d785f85a100960886a497916c6
2021/12/30 02:11:36 [crit] 34#34: *512430 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/30 02:16:03 [crit] 33#33: *514904 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.6 - - [30/Dec/2021:04:24:50 +0000] "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 400 150 "-" "-" 0 0.125 [] [] - - - - 48598e8bbad3e1b15b1887ec187bb224
10.110.0.5 - - [30/Dec/2021:04:24:50 +0000] "GET / HTTP/1.1" 400 650 "-" "Mozilla/5.0 (Linux; Android 8.0.0;) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Mobile Safari/537.36" 211 0.000 [] [] - - - - f1aa3dcdecf07e6560caec45bcfee1e4
10.110.0.4 - - [30/Dec/2021:04:24:51 +0000] "\x00\xFFK\x00\x00\x00\xE2\x00 \x00\x00\x00\x0E2O\xAAC\xE92g\xC2W'\x17+\x1D\xD9\xC1\xF3,kN\x17\x14" 400 150 "-" "-" 0 0.052 [] [] - - - - 34ef8bd3bfc420819af3ac933ff54ea9
10.110.0.4 - - [30/Dec/2021:04:52:58 +0000] "ABCDEFGHIJKLMNOPQRSTUVWXYZ9999" 400 150 "-" "-" 0 0.014 [] [] - - - - 4e5553403d3cbe707bad49c052f52a2f
10.110.0.5 - - [30/Dec/2021:05:19:57 +0000] "POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1" 400 150 "-" "-" 51 0.050 [] [] - - - - c6cec0eedc7723db6542bb78665c19c8
2021/12/30 05:21:21 [crit] 33#33: *617199 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
10.110.0.5 - - [30/Dec/2021:06:05:54 +0000] "\x16\x03\x01\x01\xFE\x01\x00\x01\xFA\x03\x03_\xE0\x15(,\x13\xA7\xFD\xD1x\xDCm\xDF_5\xFD\x8EL\xBAG\xD0\xB9\xA1\x98\xE8X\xE6E\x138\xE1\xB7\x00\x01<\xCC\x14\xCC\x13\xCC\x15\xC00\xC0,\xC0(\xC0$\xC0\x14\xC0" 400 150 "-" "-" 0 0.081 [] [] - - - - c3d52cdc830e38cd8a75aa61975835cd
10.110.0.4 - - [30/Dec/2021:07:05:48 +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.218 [] [] - - - - f18e9f0380ab696404ae465495411af8
I1230 07:48:10.715646 8 admission.go:149] processed ingress via admission controller {testedIngressLength:1 testedIngressTime:0.032s renderingIngressLength:1 renderingIngressTime:0.001s admissionTime:21.6kBs testedConfigurationSize:0.033}
I1230 07:48:10.715691 8 main.go:101] "successfully validated configuration, accepting" ingress="mainflux-nginx-ingress/mf"
I1230 07:48:11.327497 8 admission.go:149] processed ingress via admission controller {testedIngressLength:1 testedIngressTime:0.036s renderingIngressLength:1 renderingIngressTime:0.001s admissionTime:55.6kBs testedConfigurationSize:0.037}
I1230 07:48:11.327543 8 main.go:101] "successfully validated configuration, accepting" ingress="mainflux-nginx-rewrite-ingress/mf"
I1230 07:48:11.941131 8 admission.go:149] processed ingress via admission controller {testedIngressLength:1 testedIngressTime:0.034s renderingIngressLength:1 renderingIngressTime:0.001s admissionTime:21.7kBs testedConfigurationSize:0.035}
I1230 07:48:11.941229 8 main.go:101] "successfully validated configuration, accepting" ingress="mainflux-nginx-rewrite-ingress-http-adapter/mf"
10.110.0.4 - - [30/Dec/2021:07:53:33 +0000] "\x03\x00\x00/*\xE0\x00\x00\x00\x00\x00Cookie: mstshash=Administr" 400 150 "-" "-" 0 0.037 [] [] - - - - 3996839a4965b5cf2ad4ae90d7f5116e
I1230 08:15:03.063694 8 admission.go:149] processed ingress via admission controller {testedIngressLength:1 testedIngressTime:0.033s renderingIngressLength:1 renderingIngressTime:0s admissionTime:25.6kBs testedConfigurationSize:0.033}
I1230 08:15:03.063726 8 main.go:101] "successfully validated configuration, accepting" ingress="mainflux-nginx-ingress/mf"
I1230 08:15:03.676872 8 admission.go:149] processed ingress via admission controller {testedIngressLength:1 testedIngressTime:0.042s renderingIngressLength:1 renderingIngressTime:0s admissionTime:55.8kBs testedConfigurationSize:0.042}
I1230 08:15:03.677099 8 main.go:101] "successfully validated configuration, accepting" ingress="mainflux-nginx-rewrite-ingress/mf"
I1230 08:15:04.288284 8 admission.go:149] processed ingress via admission controller {testedIngressLength:1 testedIngressTime:0.041s renderingIngressLength:1 renderingIngressTime:0s admissionTime:25.7kBs testedConfigurationSize:0.041}
I1230 08:15:04.288313 8 main.go:101] "successfully validated configuration, accepting" ingress="mainflux-nginx-rewrite-ingress-http-adapter/mf"
W1230 09:06:09.292167 8 controller.go:1299] Error getting SSL certificate "mf/mainflux-server": local SSL certificate mf/mainflux-server was not found. Using default certificate
I1230 09:06:09.352552 8 admission.go:149] processed ingress via admission controller {testedIngressLength:1 testedIngressTime:0.06s renderingIngressLength:1 renderingIngressTime:0.001s admissionTime:25.6kBs testedConfigurationSize:0.061}
I1230 09:06:09.352599 8 main.go:101] "successfully validated configuration, accepting" ingress="mainflux-nginx-ingress/mf"
W1230 09:06:09.901615 8 controller.go:1299] Error getting SSL certificate "mf/mainflux-server": local SSL certificate mf/mainflux-server was not found. Using default certificate
I1230 09:06:09.942908 8 admission.go:149] processed ingress via admission controller {testedIngressLength:1 testedIngressTime:0.041s renderingIngressLength:1 renderingIngressTime:0s admissionTime:55.8kBs testedConfigurationSize:0.041}
I1230 09:06:09.942978 8 main.go:101] "successfully validated configuration, accepting" ingress="mainflux-nginx-rewrite-ingress/mf"
W1230 09:06:10.513294 8 controller.go:1299] Error getting SSL certificate "mf/mainflux-server": local SSL certificate mf/mainflux-server was not found. Using default certificate
I1230 09:06:10.552006 8 admission.go:149] processed ingress via admission controller {testedIngressLength:1 testedIngressTime:0.038s renderingIngressLength:1 renderingIngressTime:0s admissionTime:25.7kBs testedConfigurationSize:0.038}
I1230 09:06:10.552038 8 main.go:101] "successfully validated configuration, accepting" ingress="mainflux-nginx-rewrite-ingress-http-adapter/mf"
2021/12/30 09:53:31 [crit] 33#33: *767491 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
I1230 10:42:40.093248 8 admission.go:149] processed ingress via admission controller {testedIngressLength:1 testedIngressTime:0.033s renderingIngressLength:1 renderingIngressTime:0s admissionTime:14.3kBs testedConfigurationSize:0.033}
I1230 10:42:40.093294 8 main.go:101] "successfully validated configuration, accepting" ingress="mainflux-jaeger-operator-jaeger-query/mf"
2021/12/30 11:37:54 [crit] 33#33: *825144 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/30 11:47:21 [crit] 34#34: *830372 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:

在这种情况下,问题是缺少 Ingressclass

解决这个问题:

"Ignoring ingress because of error while validating ingress class" ingress="mf/mainflux-nginx-ingress" error="ingress does not contain a valid IngressClass"

您应该在您的 yaml 文件中添加注释:

  annotations:
    kubernetes.io/ingress.class:  "nginx"

this answer in another forum and also this documentation