4
闲文杂记
source link: https://www.jansora.com/notebook/107584
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Kong Gateway on KubernetesKong Gateway on Kubernetes导航前往主站应用闲文杂记代码在线代码魔方房价浅析小简助手
使用 helm 安装
helm repo add kong https://charts.konghq.com
helm repo update
# Helm 3
helm install kong/kong --generate-name --set ingressController.installCRDs=false -n kong --create-namespace
root@l2:~# helm repo add kong https://charts.konghq.com
"kong" has been added to your repositories
root@l2:~# helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "kubernetes-dashboard" chart repository
...Successfully got an update from the "nfs-subdir-external-provisioner" chart repository
...Successfully got an update from the "kong" chart repository
...Successfully got an update from the "azure" chart repository
...Successfully got an update from the "bitnami" chart repository
Update Complete. ⎈Happy Helming!⎈
root@l2:~# helm install kong/kong --generate-name --set ingressController.installCRDs=false -n kong --create-namespace
NAME: kong-1677205129
LAST DEPLOYED: Fri Feb 24 10:18:59 2023
NAMESPACE: kong
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
To connect to Kong, please execute the following commands:
HOST=$(kubectl get svc --namespace kong kong-1677205129-kong-proxy -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
PORT=$(kubectl get svc --namespace kong kong-1677205129-kong-proxy -o jsonpath='{.spec.ports[0].port}')
export PROXY_IP=${HOST}:${PORT}
curl $PROXY_IP
Once installed, please follow along the getting started guide to start using
Kong: https://docs.konghq.com/kubernetes-ingress-controller/latest/guides/getting-started/
kubectl get svc -n kong
查找LoadBalancer
的外部映射端口curl localhost:31897 -i
根据找到的端口进行验证
root@l2:~# kubectl get svc -n kong
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kong-1677205129-kong-proxy LoadBalancer 10.105.104.5 <pending> 80:31897/TCP,443:31968/TCP 4m3s
kong-1677205129-kong-validation-webhook ClusterIP 10.102.91.37 <none> 443/TCP 4m3s
root@l2:~# curl localhost:31897 -i
HTTP/1.1 404 Not Found
Date: Fri, 24 Feb 2023 02:24:36 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Content-Length: 48
X-Kong-Response-Latency: 0
Server: kong/3.1.1
{"message":"no Route matched with those values"}
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK