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

Document/Reference - Static IP setup somewhere (GKE) #797

Closed
consideRatio opened this issue Jul 26, 2018 · 4 comments
Closed

Document/Reference - Static IP setup somewhere (GKE) #797

consideRatio opened this issue Jul 26, 2018 · 4 comments
Assignees

Comments

@consideRatio
Copy link
Member

The configuring-domain-name-static-ip documentation is very relevant to users that would like to establish a fixed IP to point their domain name to.

Apparently it will be quite easy for users on GKE.

  1. Create a named reserved static globally available external ip address using the gcloud tool - a one liner.
  2. Set an annotation on the ingress object through config.yaml
ingress:
  annotations:
    - kubernetes.io/ingress.global-static-ip-name: ip-addr-name
@consideRatio consideRatio self-assigned this Jul 26, 2018
@consideRatio
Copy link
Member Author

consideRatio commented Jul 26, 2018

Well this was a bit more complicated than I thought...

There are two templates with ingress objects within the z2jh helm chart, but the only one that is in use by me with a letsencrypt setup is the one in templates/proxy/autohttps/ingress-internal.yaml. There is also another ingress object created by the autohttps deployment, hmm...

What is the object that I need to annotate?

$ kubectl get svc
NAME              TYPE           CLUSTER-IP    EXTERNAL-IP    PORT(S)                      AGE
hub               ClusterIP      10.0.8.147    <none>         8081/TCP                     34m
kube-lego-nginx   ClusterIP      10.0.2.44     <none>         8080/TCP                     33m
proxy-api         ClusterIP      10.0.12.64    <none>         8001/TCP                     34m
proxy-http        ClusterIP      10.0.14.242   <none>         8000/TCP                     34m
proxy-public      LoadBalancer   10.0.2.156    35.204.7.244   80:31416/TCP,443:30456/TCP   34m

$ kubectl get ingress
NAME                  HOSTS             ADDRESS          PORTS     AGE
jupyterhub-internal   dsp.allting.com   35.204.113.143   80, 443   32m
kube-lego-nginx       dsp.allting.com   35.204.113.143   80        31m

@clkao
Copy link
Contributor

clkao commented Jul 27, 2018

Note that this will currently fail with cert-manager based tls due to a bug in ingress-gce: cert-manager/cert-manager#606

PR for the fix: kubernetes/ingress-gce#388

@consideRatio
Copy link
Member Author

consideRatio commented Jul 27, 2018

Thanks for the headsup @clkao!

What ive done that works (step 2a in guide linked above), but still confused about regional/global address difference, written from memory on mobile

# reserve an ip...
gcloud compute addresses create my-regional-ip

# copy the ip reserved for you...
gcloud compute addresses describe my-regional-ip

# add it to config.yaml at...
proxy:
  service:
    loadBalancerIP: 123.123.123.123

Current understanding of regional ip/global ip: loadBalancers are regional, and is only allowed to be assigned a regional IP for some high level networking reason. A regional IP is still an external IP accessible to the internet users though. The downsidebis that one must create a global IP if one wants to span multiple regions later with a loadbalancer that passes traffic onwards to various regions - but this overkill for most use cases on a z2jh deployment.

@consideRatio
Copy link
Member Author

Closing in favor of #748

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

2 participants