APISIX实践,安装apisixcontroller

目标

过程

设置helm仓库。

helm repo add apisix https://charts.apiseven.com
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update

建命名空间。

kubectl create ns ingress-apisix

使用官方的安装步骤,虽然是可以装,但是因为会访问到github,在服务器上安装,经常会卡住,所以用先拿到部署文件。

helm install apisix apisix/apisix 
  --set gateway.type=NodePort 
  --set ingress-controller.enabled=true 
  --set etcd.replicaCount=1 
  --set ingress-controller.config.apisix.serviceNamespace=ingress-apisix 
  --namespace ingress-apisix 
  --kubeconfig=$KUBECONFIG 
  --dry-run

运行上面带--dry-run参数的命令,把执行结果显示的所有内容复制到一个部署文件中,这里文件名暂定apisix-etcd1.yaml。

点击查看apisix-etcd1.yaml内容

安装后,apisix组件运行起来需要一定的时间,过个5分钟查看一下pods的运行情况。

kubectl -n ingress-apisix get pods

NAME                                         READY   STATUS    RESTARTS   AGE
apisix-etcd-0                                1/1     Running   0          3h41m
apisix-7c8fb979c4-7r5jr                      1/1     Running   0          3h41m
apisix-ingress-controller-697b65cbfb-stl84   1/1     Running   0          3h41m

看一下apisix-gateway暴露的端口号

kubectl get service --namespace ingress-apisix

NAME                        TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)             AGE
apisix-etcd-headless        ClusterIP   None                   2379/TCP,2380/TCP   3h44m
apisix-etcd                 ClusterIP   10.43.86.34            2379/TCP,2380/TCP   3h44m
apisix-ingress-controller   ClusterIP   10.43.38.87            80/TCP              3h44m
apisix-admin                ClusterIP   10.43.93.205           9180/TCP            3h44m
apisix-gateway              NodePort    10.43.245.93           80:32082/TCP        3h44m

Then End

辅助

sudo helm uninstall apisix --namespace ingress-apisix --kubeconfig=$KUBECONFIG
展开阅读全文

页面更新:2024-04-22

标签:节点   文件名   仓库   组件   步骤   命令   参数   过程   目标   文件

1 2 3 4 5

上滑加载更多 ↓
推荐阅读:
友情链接:
更多:

本站资料均由网友自行发布提供,仅用于学习交流。如有版权问题,请与我联系,QQ:4156828  

© CopyRight 2008-2024 All Rights Reserved. Powered By bs178.com 闽ICP备11008920号-3
闽公网安备35020302034844号

Top