1 minute reading time
今天介绍如何在 k8s 上安装 APISIX 相关组件(Apache APISIX、Apache APISIX Dashboard、Apache APISIX Ingress Controller)。
由于 APISIX helm 组件将相关组件集合在一起了,所以只要装一个就好了。
helm repo add apisix https://charts.apiseven.com
helm repo update
helm install apisix apisix/apisix --set gateway.type=NodePort --set ingress-controller.enabled=true --set dashboard.enabled=true --set etcd.volumePermissions.enabled=true --namespace ingress-apisix
NNAME: apisix
LAST DEPLOYED: Wed Oct 27 03:00:23 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Get the application URL by running these commands:
export NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services apisix-gateway)
export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
NAME READY STATUS RESTARTS AGE
apisix-69459554d4-tc7sd 1/1 Running 0 8m49s
apisix-etcd-0 1/1 Running 0 8m49s
apisix-etcd-1 1/1 Running 0 8m49s
apisix-etcd-2 1/1 Running 0 5m16s
apisix-ingress-controller-678d8b5f6d-h6kq8 1/1 Running 0 8m49s
2021-10-27 06:29:47.259764 C | etcdmain: cannot access data directory: mkdir /bitnami/etcd/data: permission denied
在安装时增加 ---set etcd.volumePermissions.enabled=true