Skip to content

Commit 0753cc3

Browse files
Lily Hemarkxnelson
authored andcommitted
update Traefik/Voyager doc (#627)
* update chart readmes * add ingress.md * Update ingress.md * Update quickstart.md * Update ingress.md * Update ingress.md
1 parent fee8195 commit 0753cc3

File tree

7 files changed

+62
-190
lines changed

7 files changed

+62
-190
lines changed

kubernetes/samples/charts/ingress-per-domain/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ To install the chart with the release name, `my-ingress`, with the given `values
1313
```
1414
# Change directory to the cloned git weblogic-kubernetes-operator repo.
1515
$ cd kubernetes/samples/charts
16-
$ helm install ingress-per-domain --name my-ingress --value values.yaml
16+
$ helm install ingress-per-domain --name my-ingress --values values.yaml
1717
```
1818
The Ingress resource will be created in the same namespace as the WebLogic domain cluster.
1919

kubernetes/samples/charts/traefik/README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Install and configure Traefik
22
## Install the Traefik operator with a Helm chart
33
The Traefik Helm chart is located in the official Helm project `charts` directory at https://github.com/helm/charts/tree/master/stable/traefik.
4-
The chart is in the default repository for Helm at https://kubernetes-charts.storage.googleapis.com/ and is installed by default.
4+
The chart is in the default repository for Helm.
55

66
To install the Traefik operator in the `traefik` namespace with default settings:
77
```
@@ -22,6 +22,12 @@ If you want, you can download the Traefik Helm chart and untar it into a local f
2222
$ helm fetch stable/traefik --untar
2323
```
2424

25+
## Update the Traefik operator
26+
After the Traefik operator is installed and running, if you want to change some configurations of the operator, use `helm upgrade` to achieve this.
27+
```
28+
$ helm upgrade traefik-operator stable/traefik --values values.yaml
29+
```
30+
2531
## Configure Traefik as a load balancer for WLS domains
2632
In this section we'll demonstrate how to use Traefik to handle traffic to backend WLS domains.
2733

@@ -40,17 +46,17 @@ $ kubectl create -f samples/host-routing.yaml
4046
```
4147
Now you can send requests to different WLS domains with the unique entry point of Traefik with different hostnames.
4248
```
43-
$ curl --silent -H 'host: domain1.org' http://${HOSTNAME}:30305/testwebapp/
44-
$ curl --silent -H 'host: domain2.org' http://${HOSTNAME}:30305/testwebapp/
49+
$ curl -H 'host: domain1.org' http://${HOSTNAME}:30305/testwebapp/
50+
$ curl -H 'host: domain2.org' http://${HOSTNAME}:30305/testwebapp/
4551
```
4652
#### Install a path-routing Ingress
4753
```
4854
$ kubectl create -f samples/path-routing.yaml
4955
```
5056
Now you can send requests to different WLS domains with the unique entry point of Traefik with different paths.
5157
```
52-
$ curl --silent http://${HOSTNAME}:30305/domain1/
53-
$ curl --silent http://${HOSTNAME}:30305/domain2/
58+
$ curl http://${HOSTNAME}:30305/domain1/
59+
$ curl http://${HOSTNAME}:30305/domain2/
5460
```
5561
#### Install a TLS-enabled Ingress
5662
This sample demonstrates accessing the two WLS domains using an HTTPS endpoint and the WLS domains are protected by different TLS certificates.

kubernetes/samples/charts/voyager/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ If you want, you can download the Voyager Helm chart and untar it into a local f
3737
$ helm fetch appscode/voyager --untar --version 7.4.0
3838
```
3939

40+
## Update the Voyager operator
41+
After the Voyager operator is installed and running, if you want to change some configurations of the operator, use `helm upgrade` to achieve this.
42+
```
43+
$ helm upgrade voyager-operator appscode/voyager [flags]
44+
```
45+
4046
## Configure Voyager as a load balancer for WLS domains
4147
We'll demonstrate how to use Voyager to handle traffic to backend WLS domains.
4248

@@ -55,8 +61,8 @@ $ kubectl create -f samples/host-routing.yaml
5561
```
5662
Now you can send requests to different WLS domains with the unique entry point of Voyager with different hostnames.
5763
```
58-
$ curl --silent -H 'host: domain1.org' http://${HOSTNAME}:30305/testwebapp/
59-
$ curl --silent -H 'host: domain2.org' http://${HOSTNAME}:30305/testwebapp/
64+
$ curl -H 'host: domain1.org' http://${HOSTNAME}:30305/testwebapp/
65+
$ curl -H 'host: domain2.org' http://${HOSTNAME}:30305/testwebapp/
6066
```
6167
To see the Voyager host-routing stats web page, access the URL `http://${HOSTNAME}:30315` in your web browser.
6268

site/ingress.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Load balancing with Ingress
2+
Ingress is a approach provided by k8s to hook up and run a load balancer. Pls see detail in [the Ingress doc](https://kubernetes.io/docs/concepts/services-networking/ingress/).
3+
4+
## WebLogic domains as backends of Ingress
5+
6+
In Ingress a backend is defined as [a k8s service](https://kubernetes.io/docs/concepts/services-networking/service/), more specifically, a combination of a `serviceName` and a `servicePort`. A WebLogic domain is a backend of the load balancer. When the WebLogic operator creates a WebLogic domain, it always creates a k8s service for each WebLogic cluster in the domain. With the proper label selector defined in the generated service, the service contains all-and-only the running WebLogic server pods within the WebLogic cluster.
7+
8+
The name of the k8s service generated for a WebLogic cluster follows the pattern '<domainUID>-cluster-<clusterName>'. For instance, if the doaminUID is 'domain1' and the cluster name is 'cluster-1', the corresponding k8s service name generated by WebLogic operator will be 'domain1-cluster-cluster-1'.
9+
10+
The service name has the following limitation in k8s:
11+
> A DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?').
12+
13+
To meet the limitation, if the domainUID or the cluster name contains some upper-case characters or `_` , in the generated service name the upper-case characters will be converted to lower-case and `_` will be converted to `-` . For instance, if the doaminUID is 'myDomain_1' and the cluster name is 'myCluster_1', the corresponding k8s service name generated by WebLogic operator will be 'mydomain-1-cluster-mycluster-1'.
14+
15+
The service, `serviceName` and `servicePort`, of a WebLogic cluster will be used in the routing rules defined in Ingress resources and the load balancer will route traffic to the WebLogic servers within the cluster based on the rules. Note that eac traffic load, redirected by the load balancer, is not sent to the service directly, but instead, to one endpoint of the service based on its load-balancing algorithm. The load balancer depends on the k8s platform to maintain the live endpoint list of the service.
16+
17+
## Steps to setup an Ingress load balancer
18+
19+
1. Install the Ingress controller.
20+
After the Ingress controller is running, it monitors Ingress resources in given namespace(s) and acts accordingly.
21+
22+
1. Install Ingress Resource(s)
23+
Ingress resources contain routing rules to one or more backends. And Ingress controller is responsible to apply the rules to the underline load balancer.
24+
There are two approaches to create the Ingress resource:
25+
1. Use the helm chart [ingress-per-domain](kubernetes/samples/charts/ingress-per-domain).
26+
Each Ingress provider support a bunch of different annotations in Ingress resources. This helm chart allows you to define the routing rules without dealing with the detailed provider-specific annotations. Currently we support two Ingress providers: Traefik and Voyager. The limitation of the helm chart is that it only support one WebLogic cluster as the backend.
27+
28+
1. Create and install the Ingress yaml manually.
29+
Manually edit the Ingress yaml file and then install it to the k8s cluster.
30+
31+
## Guide and samples for Traefik and Voyager/HAProxy
32+
Traefik and Voyager/HAProxy are both popular Ingress providers. We provide detail guide to install and configure these two Ingress providers, specially in front of WebLogic domain(s).
33+
- [Treafik guide](kubernetes/samples/charts/traefik/README.md)
34+
- [Voyager guide](kubernetes/samples/charts/voyager/README.md)
35+
36+
We also provide Ingress samples for these two Ingress providers, with multiple WebLogic clusters as the backends and covering different routing rules, host-routing and path-routing, and TLS termination.
37+
- [Treafik samples](kubernetes/samples/charts/traefik/samples)
38+
- [Voyager samples](kubernetes/samples/charts/voyager/samples)
39+
40+
41+

site/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ $ helm update kubernetes/charts/weblogic-operator --name my-operator --namespace
9696

9797
```
9898
$ cd kubernetes/samples/charts
99-
$ helm install ingress-per-domain --name domain1-ingress --value values.yaml
99+
$ helm install ingress-per-domain --name domain1-ingress --values values.yaml
100100
```
101101

102102
(At this point, do they have a WebLogic Kubernetes deployment in a Kubernetes cluster? If so, we have to give them something to look at, to verify their results.)

site/traefik.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

site/voyager.md

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)