Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha committed Feb 25, 2018
1 parent 44411e9 commit 0dfd35f
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 8 deletions.
30 changes: 30 additions & 0 deletions docs/concepts/ingress-types/loadbalancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <minikube-ip>:<node-port> -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.
65 changes: 65 additions & 0 deletions docs/guides/ingress/dns/external-dns.md
Original file line number Diff line number Diff line change
@@ -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.
Empty file removed docs/setup/baremetal.md
Empty file.
26 changes: 18 additions & 8 deletions docs/setup/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Empty file removed docs/setup/minikube.md
Empty file.

0 comments on commit 0dfd35f

Please sign in to comment.