Skip to content

Commit

Permalink
docs: Document ingress set-up. Closes argoproj#3080 (argoproj#3592)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed Jul 24, 2020
1 parent 8b6e43f commit c968877
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 27 deletions.
82 changes: 55 additions & 27 deletions docs/argo-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ If the server is running behind reverse proxy with a subpath different from `/`
`/argo`), you can set an alternative subpath with the `--base-href` flag or the `BASE_HREF`
environment variable.

You probably now should [read how to set-up an ingress](#ingress)

### Transport Layer Security

See [TLS](tls.md).
Expand All @@ -61,52 +63,78 @@ See [SSO](argo-server-sso.md).

## Access the Argo Workflows UI

By default, the Argo UI service is not exposed with an external IP. To access the UI, use one of the
following:

### `kubectl port-forward`

```sh
kubectl -n argo port-forward deployment/argo-server 2746:2746
kubectl -n argo port-forward svc/argo-server 2746:2746
```

Then visit: http:https://127.0.0.1:2746

By default, the Argo UI service is not exposed with an external IP. To access the UI, use one of the
following:

### Method 1: kubectl port-forward
### Expose a `LoadBalancer`

```
kubectl -n argo port-forward deployment/argo-server 2746:2746
```
Update the service to be of type `LoadBalancer`.

Then visit: http:https://127.0.0.1:8001
```sh
kubectl patch svc argo-server -n argo -p '{"spec": {"type": "LoadBalancer"}}'
```

### Method 2: kubectl proxy
Then wait for the external IP to be made available:

```sh
kubectl get svc argo-server -n argo
```
kubectl proxy
```sh
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
argo-server LoadBalancer 10.43.43.130 172.18.0.2 2746:30008/TCP 18h
```

Then visit: http:https://127.0.0.1:8001/api/v1/namespaces/argo/services/argo-server:web/proxy/
### Ingress

NOTE: artifact download and webconsole is not supported using this method
You can get ingress working as follows:

### Method 3: Expose a LoadBalancer
Update `service/argo-server` spec with `type: LoadBalancer`:

Update the argo-ui service to be of type `LoadBalancer`.

```
kubectl patch svc argo-ui -n argo -p '{"spec": {"type": "LoadBalancer"}}'
```yaml
- name: web
port: 2746
targetPort: 2746
type: LoadBalancer
```

Then wait for the external IP to be made available:
Add `BASH_HREF` as environment variable to `deployment/argo-server` :

```
kubectl get svc argo-ui -n argo
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
argo-ui LoadBalancer 10.19.255.205 35.197.49.167 80:30999/TCP 1m
```

NOTE: On Minikube, you won't get an external IP after updating the service -- it will always show
`pending`. Run the following command to determine the Argo UI URL:

```yaml
- name: argo-server
image: argoproj/argocli:latest
args: [server]
env:
- name: BASE_HREF
value: /argo/
```
minikube service -n argo --url argo-ui

Create a ingress, with the annotation `ingress.kubernetes.io/rewrite-target: /`:

```yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: argo-server
annotations:
ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- backend:
serviceName: argo-server
servicePort: 2746
path: /argo
```

[Learn more](https://github.com/argoproj/argo/issues/3080)
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ nav:
- artifact-repository-ref.md
- resource-duration.md
- workflow-creator.md
- synchronization.md
- workflow-of-workflows.md
# all other topics, including API access
- Advanced:
- workflow-requirements.md
Expand Down

0 comments on commit c968877

Please sign in to comment.