Environment 1: Use in K8s
Stage 1: Installation
Scenario 1: Use in a Standard K8s Cluster
Helm Installation Command
Obtain the LoadBalancer IP of Higress Gateway and write it down. You can use it and port 80 and 443 to access Higress Gateway.
Scenario 2: Use in Local Environment
The following groups can be applied to all local K8s clusters. If there is already a test cluster running on your PC, you can go to Step 3 directly and install Higress.
Step 1: Install kubectl & kind
MacOS:
Use PowerShell in Windows:
Download kubectl v1.27.1 and kind v0.18.0.
Or if you have curl
installed, use the following commands:
Note: To find out the latest stable version of
kubectl
(for example, for scripting), take a look at https://dl.k8s.io/release/stable.txt.
Then rename downloaded kind-windows-amd64
or kind-windows-amd64.exe
to kind.exe
. And move both exe files to a file location on your system PATH.
Linux:
Step 2: Create and Activate kind
First, create a cluster config file: cluster.conf
Commands for Mac & Linux:
Commands for Windows:
Note
currently, the namespace higress-system
has a svc which type is LoadBalancer
, it can not get IP in cluster by default. we can use official support to enable this function,please refer to https://kind.sigs.k8s.io/docs/user/loadbalancer/
Step 3: Install Higress
when you install higress
in local environment, you should use --set global.local=true
.
If you’d like to enable the built-in o11y suite, please refer to the Deploy by Helm document.
After installation, you can access Higress Gateway in the local cluster via port 80 and 443.
Note: If you are using a pre-existed local K8s cluster, you may need to use the command below to forward ports out of the cluster, and try the local ports later.
Stage 2: Configuration
Assuming that there is already a service named “foo” deployed in the default namespace, we’d like to create a route, forwarding http://foo.bar.com/foo requests to this service.
You can use the following YAML to create this test service if needed.
Method 1: Use Higress Console
Use hgctl to open Higress Console.
For the first time, you will need to configure the admin credentials.
After configuration, log into Higress Console using the credential just configured.
Click “Domain Management” on the navigation bar left. Click “Create Domain” button. Then fill the form according to the image below and click “Confirm” button.
Click “Route Management” on the navigation bar left. Click “Create Route” button. Then fill the form according to the image below and click “Confirm” button.
Method 2: Use Ingress CRD
Use the YAML below to create the test route we need.
Stage 3: Validate
Use the following command to check whether the test route works properly:
Environment 2: Use in Docker Compose without K8s
Stage 1: Installation
Installation Command 1: Use a separated-deployed Nacos service
Please replace 192.168.0.1
with the actual IP address of Nacos service (if Nacos is deployed locally, please use a non-loopback address such as localhost
or 127.0.0.1
), and update the value of --nacos-username
and --nacos-password
based on actual configurations. If authentication isn’t enabled in Nacos, you can remove these two arguments.
Installation Command 2: Use the Higress Built-In Nacos
Note: On Windows, you can use Unix-like shells such as Cygwin, Git Bash to execute the command above.
One-click deployment: We provide a one-click deployment to Alibaba Cloud solution, more convenient operation
Stage 2: Configuration
Open http://127.0.0.1:8080
in browser. For the first time, you will need to configure the admin credentials.
After configuration, log into Higress Console using the credential just configured.
Click “Service Sources” on the navigation bar left. Click “Create Service Source” button. Then fill the form according to the image below and click “Confirm” button.
Click “Domain Management” on the navigation bar left. Click “Create Domain” button. Then fill the form according to the image below and click “Confirm” button.
Click “Route Management” on the navigation bar left. Click “Create Route” button. Then fill the form according to the image below and click “Confirm” button.
Stage 3: Validate
Use the following command to check whether the test route works properly: