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

Using ingress with operator #1014

Open
himanshusaini-fa opened this issue Jan 2, 2024 · 0 comments
Open

Using ingress with operator #1014

himanshusaini-fa opened this issue Jan 2, 2024 · 0 comments

Comments

@himanshusaini-fa
Copy link

himanshusaini-fa commented Jan 2, 2024

I am trying to set up public access to a cluster deployed using the operator. I am using the below configuration while deploying a CrdbCluster.

  ingress:
    ui:
      ingressClassName: nginx
      host: cockroach.cooldb.xyz

I am using nginx controller and cert-manager.

Below is my ingress and cert manager in order

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
 name: cockroach-ingress
 namespace: cockroach-operator-system
 annotations:
   cert-manager.io/cluster-issuer: cert-issuer
   nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"
   nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
   nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
   nginx.ingress.kubernetes.io/proxy-body-size: 50m
   nginx.ingress.kubernetes.io/use-regex: "true"

spec:
 ingressClassName: nginx 
 tls:
   - hosts:
       - cockroach.cooldb.xyz
     secretName: letsencrypt-cert
 rules:
   - host: cockroach.cooldb.xyz
     http:
       paths:
         - path: /
           pathType: Prefix
           backend:
             service:
               name: cockroachdb-public
               port:
                 name: http
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: cert-issuer
spec:
  acme:
    # You must replace this email address with your own.
    # Let's Encrypt will use this to contact you about expiring
    # certificates, and issues related to your account.
    email: [email protected]
    server: https://acme-v02.api.letsencrypt.org/directory
    privateKeySecretRef:
      # Secret resource that will be used to store the account's private key.
      name: letsencrypt-cluster-issuer
    # Add a single challenge solver, HTTP01 using nginx
    solvers:
    # https://github.com/Mimetis/AKS_DNS01Solver/tree/master
      - dns01:
          azureDNS:
            clientID: #############################
            clientSecretSecretRef:
              name: azuredns-config
              key: client-secret
            subscriptionID: ###########################
            tenantID: ##############################
            resourceGroupName: cool-domains
            hostedZoneName: cooldb.xyz
            environment: AzurePublicCloud

But I am still getting error ERR_TOO_MANY_REDIRECTS in the browser while trying to acces the db at the domain cockroach.cooldb.xyz and also getting 307 logs from nginx-controller hitting the correct service "cockroachdb-public".

What am I doing wrong here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant