Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does ACK deploy Apache apisix-ingress-cotroller

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the relevant knowledge of "how to deploy Apache apisix-ingress-cotroller in ACK". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Background

Ingress is a noteworthy module in Kubernetes. As an entrance to external access to Kubernetes cluster services, there are a variety of Ingress controller implementations on the market. Apache/apisix-ingress-controller launched by the domestic real-time and high-performance API gateway Apache APISIX is one of them, which provides services as a more powerful ingress. The author is going to deploy tests on the Aliyun ACK cluster.

Topic description

This article mainly introduces the deployment of apisix-ingress-controller in Aliyun ACK and tests a simple scenario using httpbin.

Deployment Topology

Network topology

Dependency item

ACK cluster of Aliyun; recommended minimum configuration: 3 master nodes: CPU 2 core memory 4G2 worker nodes: CPU 4 core memory 8G

Installation steps

Apisix 2.1 release

Install apisix 2.1 release through helm

$kubectl create ns apisix $git clone https://github.com/apache/apisix-helm-chart.git $cd. / apisix-helm-chart $helm repo add bitnami https://charts.bitnami.com/bitnami $helm dependency update. / chart/apisix $helm install apisix. / chart/apisix\-- set gateway.type=LoadBalancer\-- set allow.ipList= "{0.0.0.0ame0}"\-- namespace apisix

Tips: PVC is specified when etcd is installed. When PVC is deployed in Aliyun, PV needs to be specified as cloud disk. Add: volume.beta.kubernetes.io/storage-class: alicloud-disk-ssd to the annotations of PVC. (for the relationship between PVC and PV, please refer to here.)

Apisix-ingress-controller

Install apisix-ingress-controller through helm

$git clone https://github.com/apache/apisix-ingress-controller.git $cd. / apisix-ingress-controller $helm install ingress-apisix-base-n apisix. / charts/base $helm install ingress-apisix. / charts/ingress-apisix\-set ingressController.image.tag=dev\-- set ingressController.config.apisix.baseURL= http://apisix-admin:9180/apisix/admin\-- set ingressController.config.apisix.adminKey=edd1c9f034335f136f87ad84b625c8f1\-- namespace apisix

test

Check whether the cluster is deployed successfully

Configure a simple route for testing

ApiVersion: apisix.apache.org/v1 kind: ApisixRoute metadata: name: httpbin-route namespace: apisix spec: rules:-host: httpbin.apisix.com http: paths:-backend: serviceName: httpbin servicePort: 80 path: / hello*

Looking at the results through apisix admin api, it is found that the route has been configured correctly.

{"action": "get", "count": "2", "header": {"revision": "46", "cluster_id": "8320356269565269865", "raft_term": "2", "member_id": "3807956127770623265", "node": {"key": "/ apisix/upstreams" "dir": true, "modifiedIndex": 27, "createdIndex": 3, "nodes": [{"key": "/ apisix/upstreams/00000000000000000041", "modifiedIndex": 42 "value": {"nodes": {"172.20.1.12 roundrobin 80": 100}, "type": "roundrobin", "pass_host": "pass" "hash_on": "vars", "desc": "apisix_httpbin_80", "create_time": 1608561159, "update_time": 1608561159}, "createdIndex": 42}]}

Capacity expansion of httpbin

View httpbin in k8s

View httpbin upstream in apisix

/ / formatted {. "nodes": {"172.20.1.12 apisix/upstreams/00000000000000000041 80", "172.20.0.198 desc 80": 100, "172.20.0.1979 key 80": 100}, "key": "000000000041", "desc": "apisix_httpbin_80" ...} this is the end of "how ACK deploys Apache apisix-ingress-cotroller". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report