diff --git a/docs/concepts/ingress-types/loadbalancer.md b/docs/concepts/ingress-types/loadbalancer.md index 5081b0ecf..7716057b9 100644 --- a/docs/concepts/ingress-types/loadbalancer.md +++ b/docs/concepts/ingress-types/loadbalancer.md @@ -159,3 +159,33 @@ and the apply the annotation to your Ingress. You can't use Global Static IP with a LoabBalancer Ingress managed by GKE. Voyager creates a `LoadBalancer` Service to expose HAProxy pods. Under the hood, Kubernetes creates a `Network LoadBalancer` to expose that Kubernetes service. Network LoadBalancers can only use regional static IPs. If you want to use Global static IP with Google Cloud, these pods need to be exposed via a HTTP LoadBalancer. Voyager does not support this today. This is not a priority for us but if you want to contribute, we can talk more. To use HTTP LoadBalancers today, you can use the `gce` ingress controller: https://github.com/kubernetes/ingress-gce . You may already know that HTTP LoadBalancer can only open port 80, 8080 and 443 and serve HTTP traffic. Please consult the official docs for more details: https://cloud.google.com/compute/docs/load-balancing/ + +**How to use LoadBalancer type ingress in Minikube cluster?** + +Minikube clusters do not support service type `LoadBalancer`. So, you can try the following work arounds: + +- You can set the `Host` header is your http request to match the expected domain and port. This will ensure HAProxy matches the rules properly. + +```console +$ curl -vv : -H "Host: app.example.com" +``` + +- This work around is available thanks to [@david92rl](https://github.com/david92rl). You can use a service type ClusterIP with an ip fixed (like 10.0.0.150), then create a route to it from host machine. + +**_Minikube on Mac with virtualbox/vmware providers_** + +```console +sudo route -n delete ${K8S_NETWORK} > /dev/null 2>&1 +sudo route -n add ${K8S_NETWORK} $(minikube ip) +interface=$(ifconfig 'bridge0' | grep member | awk '{print $2}' | xargs | awk '{print $1}') +sudo ifconfig bridge0 -hostfilter ${interface} +``` + +**_Minikube on Linux_** + +```console +sudo ip route del ${K8S_NETWORK} +sudo ip route add ${K8S_NETWORK} via $(minikube ip) +``` + +*K8S_NETWORK* usually is `10.0.0.0/24` but it's worth to double check always. diff --git a/docs/guides/ingress/dns/external-dns.md b/docs/guides/ingress/dns/external-dns.md index e69de29bb..45994ed1f 100644 --- a/docs/guides/ingress/dns/external-dns.md +++ b/docs/guides/ingress/dns/external-dns.md @@ -0,0 +1,65 @@ +# Configuring external DNS servers + +[external-dns](https://github.com/kubernetes-incubator/external-dns) project can be used to configure external DNS servers for Voyager managed ingresses. + +## LoadBalancer Ingress + +For a [LoadBalancer](/docs/concepts/ingress-types/loadbalancer.md) type Ingress, apply `"external-dns.alpha.kubernetes.io/hostname"` annotation on the **service** that exposes HAProxy pods. This service should have a name like `voyager-{ingress-name}` in the same namespace of the Ingress object. Since, Voyager uses its own CRD for Ingress, `external-dns` project must use the service to discover loadbalancer ip. + +```yaml +apiVersion: voyager.appscode.com/v1beta1 +kind: Ingress +metadata: + name: test-ingress-voyager + namespace: vdimov-dev + annotations: + ingress.appscode.com/annotations-service: | + { + "external-dns.alpha.kubernetes.io/hostname" : "voyager.example.com,voyager-1.example.com,voyager-2.example.com" + } + ingress.appscode.com/replicas: '2' +spec: + rules: + - host: voyager.example.com + http: + paths: + - backend: + serviceName: web + servicePort: '80' +``` + +## NodePort Ingress + +`external-dns` does not support [NodePort](/docs/concepts/ingress-types/nodeport.md) ingress. + + +## HostPort Ingress + +[HostPort](/docs/concepts/ingress-types/hostport.md) type Ingress is supported by external-dns, since version [v0.5.0-alpha.1](https://github.com/kubernetes-incubator/external-dns/releases/tag/v0.5.0-alpha.1). Here, apply `"external-dns.alpha.kubernetes.io/hostname"` annotation on the HAProxy **pods**. + +```yaml +apiVersion: voyager.appscode.com/v1beta1 +kind: Ingress +metadata: + name: test-ingress-voyager + namespace: vdimov-dev + annotations: + ingress.appscode.com/type: HostPort + ingress.appscode.com/annotations-pod: | + { + "external-dns.alpha.kubernetes.io/hostname" : "voyager.example.com,voyager-1.example.com,voyager-2.example.com" + } + ingress.appscode.com/replicas: '2' +spec: + rules: + - host: voyager.example.com + http: + paths: + - backend: + serviceName: web + servicePort: '80' +``` + +## Internal Ingress + +[Internal](/docs/concepts/ingress-types/internal.md) ingress is not accessible from outside a cluster. Hence, there is nothing to configure in external DNS servers. diff --git a/docs/setup/baremetal.md b/docs/setup/baremetal.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs/setup/install.md b/docs/setup/install.md index 1dfb02712..63f275596 100644 --- a/docs/setup/install.md +++ b/docs/setup/install.md @@ -15,6 +15,7 @@ section_menu_id: setup # Installation Guide ## Using YAML + Voyager can be installed via installer script included in the [/hack/deploy](https://github.com/appscode/voyager/tree/6.0.0-rc.0/hack/deploy) folder. ```console @@ -96,15 +97,8 @@ $ curl -fsSL https://raw.githubusercontent.com/appscode/voyager/6.0.0-rc.0/hack/ | bash -s -- --provider=$provider --enable-admission-webhook [--rbac] ``` -__N.B.__ -- If you are installing Voyager on a GKE cluster, you will need cluster admin permissions to install Voyager operator. Run the following command to grant admin permision to the cluster. - -```console -kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=google-email-for-gce-project -``` - - ## Using Helm + Voyager can be installed via [Helm](https://helm.sh/) using the [chart](https://github.com/appscode/voyager/tree/6.0.0-rc.0/chart/stable/voyager) included in this repository or from official charts repository. To install the chart with the release name `my-release`: ```console @@ -137,6 +131,22 @@ $ helm install stable/voyager --name my-release \ To see the detailed configuration options, visit [here](https://github.com/appscode/voyager/tree/6.0.0-rc.0/chart/stable/voyager). +### Installing in GKE Cluster + +If you are installing Voyager on a GKE cluster, you will need cluster admin permissions to install Voyager operator. Run the following command to grant admin permision to the cluster. + +```console +kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=google-email-for-gce-project +``` + +### Installing in Minikube + +Voyager can be used in minikube using `--provider=minikube`. In Minikube, a `LoadBalancer` type ingress will only assigned a NodePort. + +### Installing in Baremetal Cluster + +Voyager works great in baremetal cluster. To install, set `--provider=baremetal`. In baremetal cluster, `LoadBalancer` type ingress in not supported. You can use [NodePort](/docs/concepts/ingress-types/nodeport.md), [HostPort](/docs/concepts/ingress-types/hostport.md) or [Internal](/docs/concepts/ingress-types/internal.md) ingress objects. + ## Verify installation To check if Voyager operator pods have started, run the following command: diff --git a/docs/setup/minikube.md b/docs/setup/minikube.md deleted file mode 100644 index e69de29bb..000000000