Search code examples
google-kubernetes-enginekubernetes-helmbitbucket-servergoogle-cloud-dnsgke-networking

GKE with Cloud DNS setting up


I'm new to kubernetes, helm and google cloud. Got problem during domain setup for ingress.

What i got/did:

  1. https://github.com/atlassian-labs/data-center-helm-charts/ -> Bitbucket
  2. Installed it on GKE with helm
  3. Everything worked well. Bitbucket-server deployment is up, service for bitbucket is up, ingress is up. Everything OK with database.
  4. Bought domain

So i'm trying to proxy bitbucket-server to subdomain so i can use it on bitbucket.my-domain-com.

What i did:

  1. Installed bitbucket with helm (repo provided) with custom values. Part of bitbucket values.yaml:
ingress:
  create: true
  nginx: true
  maxBodySize: 250m
  host: bitbucket.my-domain.com
  path: "/"
  annotations: {}
  https: false
  tlsSecretName:
  1. Checked ingress:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    meta.helm.sh/release-name: bitbucket-server
    meta.helm.sh/release-namespace: atlassian
    nginx.ingress.kubernetes.io/affinity: cookie
    nginx.ingress.kubernetes.io/affinity-mode: persistent
    nginx.ingress.kubernetes.io/proxy-body-size: 250m
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "60"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "60"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "60"
  creationTimestamp: "2021-08-23T22:52:43Z"
  generation: 1
  labels:
    app.kubernetes.io/instance: bitbucket-server
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: bitbucket
    app.kubernetes.io/version: 7.15.1-jdk11
    helm.sh/chart: bitbucket-0.15.0
  managedFields:
  - apiVersion: networking.k8s.io/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:kubernetes.io/ingress.class: {}
          f:meta.helm.sh/release-name: {}
          f:meta.helm.sh/release-namespace: {}
          f:nginx.ingress.kubernetes.io/affinity: {}
          f:nginx.ingress.kubernetes.io/affinity-mode: {}
          f:nginx.ingress.kubernetes.io/proxy-body-size: {}
          f:nginx.ingress.kubernetes.io/proxy-connect-timeout: {}
          f:nginx.ingress.kubernetes.io/proxy-read-timeout: {}
          f:nginx.ingress.kubernetes.io/proxy-send-timeout: {}
        f:labels:
          .: {}
          f:app.kubernetes.io/instance: {}
          f:app.kubernetes.io/managed-by: {}
          f:app.kubernetes.io/name: {}
          f:app.kubernetes.io/version: {}
          f:helm.sh/chart: {}
      f:spec:
        f:rules: {}
    manager: helm
    operation: Update
    time: "2021-08-23T22:52:43Z"
  name: bitbucket-server
  namespace: atlassian
  resourceVersion: "928732"
  uid: 11224174-3a27-4e28-a8e5-77e61aa996fa
spec:
  rules:
  - host: bitbucket.my-domain.com
    http:
      paths:
      - backend:
          serviceName: bitbucket-server
          servicePort: 80
        path: /
        pathType: Prefix
status:
  loadBalancer: {}

  1. Also i tryed to add new zone in cloud dns with domain bitbucket.my-domain.com

I don't have LB in cloud DNS. As i checked, it should create automatically after ingress creation but seems something went wrong. I uninstalled and installed with helm it a few times and it still not creating Load Balancing.

Can someone help me with advice? Seems like i need LB but i`m not sure and why its not created automatically?


Solution

  • In values.yaml

    ingress:
      create: true
      nginx: true
      maxBodySize: 250m
      host: bitbucket.my-domain.com
      path: "/"
      annotations: {}
      https: false
      tlsSecretName:
    

    notice that the nginx field is set to true. This assumes that you have already installed the Nginx Ingress Controller on your GKE cluster. The most straightforward way to get things working would be to install the controller on your GKE cluster. You can find the installation instructions here.