Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Described installation process not working #2100

Open
fliegera opened this issue May 2, 2024 · 3 comments
Open

Described installation process not working #2100

fliegera opened this issue May 2, 2024 · 3 comments

Comments

@fliegera
Copy link

fliegera commented May 2, 2024

I am following the installation procedure for the operator as described here on my local CRC version 4.15.3 as welll as on a productive system running on 4.13.37

https://min.io/docs/minio/kubernetes/openshift/operations/installation.html

First issue is that the Operator is installed without any Nodeport

This is the spec of the Route that i created according to your documentation. All I get is Applicatin not available even if all pods are running

spec:
  host: operator-console-route-minio-operator.apps-crc.testing
  to:
    kind: Service
    name: console
    weight: 100
  port:
    targetPort: http
  wildcardPolicy: None
status:
  ingress:
    - host: operator-console-route-minio-operator.apps-crc.testing
      routerName: default
      conditions:
        - type: Admitted
          status: 'True'
          lastTransitionTime: '2024-05-02T19:00:35Z'
      wildcardPolicy: None
      routerCanonicalHostname: router-default.apps-crc.testing
@ramondeklein
Copy link
Contributor

Although the documentation implies that node ports are automatically created, they are not. Nodeports is probably also not how you want to expose your service. You typically expose services in OpenShift via routes, but it looks like the http port always redirects to an HTTPS connection and this fails, because there is no matching route.

You can create the following route instead (it creates a route on HTTPS):

kind: Route
apiVersion: route.openshift.io/v1
metadata:
  name: minio
  namespace: minio-operator
  labels:
    app.kubernetes.io/instance: minio-operator
    app.kubernetes.io/name: operator
    name: console
    olm.managed: 'true'
    operators.coreos.com/minio-operator.minio-operator: ''
spec:
  host: operator-console-route-minio-operator.apps-crc.testing
  port:
    targetPort: https
  to:
    kind: Service
    name: console
  tls:
    termination: passthrough
    insecureEdgeTerminationPolicy: Redirect

You can then go to https://operator-console-route-minio-operator.apps-crc.testing and the console should open. You may get errors about invalid certificates, because the certificate won't be valid for your hostname.

We'll revise the documentation for OpenShift deployment. We made some changes and they aren't reflected here yet. I'll also look into the issue why the http port redirects back to https.

@ramondeklein ramondeklein self-assigned this May 8, 2024
@ramondeklein
Copy link
Contributor

ramondeklein commented May 13, 2024

The operator service is directing HTTP traffic to HTTPS, because the --cert-dir is specified and certificates are present. The certificate is valid for console.minio-operator.svc and console.minio-operator.svc.cluster.local (deployed in namespace minio-operator) and issued by openshift-service-serving-signer. When TLS is enabled, then non-HTTP traffic is automatically redirected to use HTTPS.

The TLS redirection forwards to the same hostname/port, but with the https scheme. When using port-forwarding, this will result in a port-forward to port 9090 again which is still the HTTP port, so it won't work. I guess, this redirection only works correctly when there is a route on the default ports (HTTP port 80 and HTTPS port 443). If a user goes to http://console.minio-operator.svc.cluster.local/, then it will redirect to https://console.minio-operator.svc.cluster.local/ and it will work fine.

When deploying via the standard Helm script, the --cert-dir is specified, but no certificates are present in the directory. This works fine both on OpenShift and "regular" Kubernetes clusters.

@pjuarezd Is there a reason why the OpenShift deployment deploys with cluster certficates when deploying via the OpenShift console?

@dvaldivia The TLS redirection functionality doesn't make much sense if the host header contains an explicit port. We may want to remove that redirect in those cases and return an error instead.

@pjuarezd
Copy link
Member

@ravindk89 we need to do some updates in the docs for Openshift installs

@feorlen feorlen self-assigned this May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants