Skip to content

How to expose Operator via Route

Cesar Celis Hernandez edited this page Apr 3, 2024 · 3 revisions

Steps:

  1. Create Route:
Screenshot 2023-09-13 at 1 47 03 PM
  1. Set a Name

  2. Select console Service

  3. Select target port as 9090 to 9090 using TCP

  4. Click Create:

Screenshot 2023-09-13 at 1 48 22 PM
  1. Click over location:
Screenshot 2023-09-13 at 1 48 44 PM
  1. It will show you Operator UI:
Screenshot 2023-09-13 at 1 49 03 PM
  1. Get the Token:
function JWTOperator() {
kubectl apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
  name: console-sa-secret
  namespace: minio-operator
  annotations:
    kubernetes.io/service-account.name: console-sa
type: kubernetes.io/service-account-token
EOF
SA_TOKEN=$(kubectl -n minio-operator  get secret console-sa-secret -o jsonpath="{.data.token}" | base64 --decode)
echo ""
echo ""
echo ""
echo $SA_TOKEN
echo ""
echo ""
echo ""
}
$ JWTOperator
secret/console-sa-secret configured



eyJhbGciOiJSUzI1NiIsImtpZCI6IjQxNWU4VjliZGc4RFhSejlYSmtSZkEwc0k3V0ZYanN5X0RUM3oyUzlpajgifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJtaW5pby1vcGVyYXRvciIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJjb25zb2xlLXNhLXNlY3JldCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJjb25zb2xlLXNhIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiNTE1MjZmMDItODk1MS00ZmQyLTg1N2QtNjRjNjZkODAwYzhjIiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50Om1pbmlvLW9wZXJhdG9yOmNvbnNvbGUtc2EifQ.Hk3aDvNMMCijry7mAcGDVp2Lt74sDglAjjzsrFfIkfAAdAD61PGtlX0CBuCFv4yZavx4kI75sPW-59ngRb7UHfl7xD_5Gc77yUp_0zmxQWrxMvP_l6j6crlzW57TMhMkKrDQCDBEUekWIxi29X730QFIfGjKMalVZ0Am5Ka2QusjvS0yTDF9thnzY1MFD7eeRRyR3z8nfpeL24XLjPQWj3ACdvvzIVjKA4QPDB1IWhSUnWD5vWulKYosqmOA5o9e8TTN6yVgLpmtAzOhJkIqKLEtaaQ0B3qIJ86iiG0d5GgO6hh11Y07xWyjMvogidBzlhXROFeU2l66cN_eudU-dw_atg1ZjrVHeoP-j3Q4LDeQuh5zjkv5TYADY3FJWA_OVH8pWWAzRzm7FydWeDIabPQAbz71PXk_SiO3y0nOiOHA1uRzqfEoV2hYZMAAa1DsjM77ilNL7GI9L72BSza0rHj1K2YKC3SLaYE-iaHYfpliqC8SWvz19qO5U3V32j1HaeOINzSVcGhQN0oMr2c3U0EI71AL9BVZjZTRCbX2kePxFuuqeSEHKQ23qm5lcz4-ONDFkaYAYFcAS_HMz9R3HpJzuRbzTIP8lAbhT5mae2WM9QIv9RvoMQaaonRDhemmcKFpAcBnOXtNnFbFwaTic6Xxq8lP7I6Ej52T1H0AthE
  1. Login:
Screenshot 2023-09-13 at 1 50 01 PM

OpenShift Route:

kind: Route
apiVersion: route.openshift.io/v1
metadata:
  name: my-route-2
  namespace: tenant-lite
  labels:
    v1.min.io/tenant: myminio
  annotations:
    openshift.io/host.generated: 'true'
spec:
  host: my-route-2-tenant-lite.apps-crc.testing
  to:
    kind: Service
    name: myminio-hl
    weight: 100
  port:
    targetPort: http-minio
  tls:
    termination: passthrough
  wildcardPolicy: None
status:
  ingress:
    - host: my-route-2-tenant-lite.apps-crc.testing
      routerName: default
      conditions:
        - type: Admitted
          status: 'True'
          lastTransitionTime: '2023-03-18T12:10:38Z'
      wildcardPolicy: None
      routerCanonicalHostname: router-default.apps-crc.testing
Clone this wiki locally