Comments (5)
what's your helm version?
from kubernetes-ingress-controller.
Thanks for the response. Let me clearly explain what I am trying to do with Kong on Kubernetes
I am new to Kong Ingress. I trying to deploy Kong as my ingress and ingress controller.
For my understanding:
I followed the below steps with respective versions
- Containerd - containerd containerd.io 1.6.26
- K8S Version
Client Version: v1.28.0
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.0 - Calico version
Image: docker.io/calico/pod2daemon-flexvol:v3.26.4
Image: docker.io/calico/cni:v3.26.4
Image: docker.io/calico/node:v3.26.4
Steps to reproduce:
Ran the below helm commands to deploy kong in the cluster
reference: https://github.com/Kong/charts
I ran these commands to deploy kong
helm repo add kong https://charts.konghq.com
helm fetch kong/kong #this fetched the version kong-2.37.0
helm install kong kong/ -n kong
Error:
- When I am running this I am getting the error
Error: parse error at (kong/templates/_helpers.tpl:1281): unclosed action
Workaround/Solution:
I changed the line kong/templates/_helpers.tpl:1281 into a single line
{{- if and (semverCompare ">= 3.1.0" (include "kong.effectiveVersion" .Values.ingressController.image)) (contains (print .Values.ingressController.env.feature_gates) "KongServiceFacade=true") }}
Result:
$ helm install kong kong/ -n kong
NAME: kong
LAST DEPLOYED: Wed Feb 19 09:12:48 2024
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-kong-proxy -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
PORT=$(kubectl get svc --namespace kong kong-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/
WARNING: Kong Manager will not be functional because the Admin API is not
enabled. Setting both .admin.enabled and .admin.http.enabled and/or
.admin.tls.enabled to true to enable the Admin API over HTTP/TLS.
This leads me to another confusions:
- As per the docs referred above recommend to deploy Gateway. However, my understanding is either Gateway or Ingress can be used to route the traffic. Please correct me if am understanding wrongly.
- Defining my K8S Cluster - Single node , K8s 1.28 running on GCP VM which has internal and external IP only.
- I deployed this kong in my dev namespace and tried to deploy ingress for my microservices.
changed kong-proxy service type to LoadBalancer
changed kong-admin service type to LoadBalancer (I deployed admin as I was receiving error that admin is required to start ingress controller)
added externalIPs: 34.x.x.x in values.yaml
- kong-proxy and kong-admin - picked my externalIP from values.yaml
- However I am getting error which is throwing from _helpers.tpl like that
Error
Error: could not retrieve Kong admin root: making HTTP request: Get "http://[localhost]:8001/": dial tcp localhost:80: connect: connection refused
Error: could not retrieve Kong admin root: making HTTP request: Get "http://[localhost]:8001/": dial tcp localhost:80: connect: connection refused
I changed localhost to loadBalancerIP in _helpers.tpl and updated externalIPs to loadBalancerIP in values.yaml. Updated service and container port of admin to 80 under http. Still I am facing same error.
Defaulted container "ingress-controller" out of: ingress-controller, proxy, clear-stale-pid (init)
time="2024-02-21T08:59:56Z" level=info msg="diagnostics server disabled"
time="2024-02-21T08:59:56Z" level=info msg="starting controller manager" commit=119dca97739dafee5f0539b96774144754328e8d logger=setup release=2.1.1 repo="https://github.com/Kong/kubernetes-ingress-controller.git"
time="2024-02-21T08:59:56Z" level=info msg="getting enabled options and features" logger=setup
time="2024-02-21T08:59:56Z" level=info msg="getting the kubernetes client configuration" logger=setup
W0221 08:59:56.413211 1 client_config.go:615] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
time="2024-02-21T08:59:56Z" level=info msg="getting the kong admin api client configuration" logger=setup
time="2024-02-21T08:59:56Z" level=error msg="tag filtering disabled because Kong Admin API does not support tags" error="making HTTP request: Get "http://[35.238.59.45]:80/tags": dial tcp 35.238.59.45:80: connect: connection refused" logger=setup
Error: could not retrieve Kong admin root: making HTTP request: Get "http://[35.238.59.45]:80/": dial tcp 35.238.59.45:80: connect: connection refused
Error: could not retrieve Kong admin root: making HTTP request: Get "http://[35.238.59.45]:80/": dial tcp 35.238.59.45:80: connect: connection refused
Please help me what are the required components to be enabled if I want to deploy Kong as my ingressController. Currently, I am trying with http only.
Highly appreciate for the help.
from kubernetes-ingress-controller.
Thank you for the detailed steps. I will try to reproduce it.
from kubernetes-ingress-controller.
In the steps you mentioned above, you provided the following command.
helm repo add kong https://charts.konghq.com/
helm fetch kong/kong #this fetched the version kong-2.37.0
helm install kong kong/ -n kong
The last command shows that you installed it through the local Kong directory instead of installing it through the Kong Helm repo.
So you can try changing to a different directory, to ensure that there is no kong
directory with the same name in the current directory.
from kubernetes-ingress-controller.
As per the docs referred above recommend to deploy Gateway. However, my understanding is either Gateway or Ingress can be used to route the traffic. Please correct me if am understanding wrongly.
Gateway is the component that actually carries traffic. After installing KIC, you have deployed both the KIC controller and Gateway.
jintao.zhang@kic-jt-test:~$ kubectl -n kong get pods
NAME READY STATUS RESTARTS AGE
kong-kong-58bb4bdc-bcl2c 2/2 Running 0 3m34s
The client's traffic only needs to access the svc named *-kong-proxy
.
jintao.zhang@kic-jt-test:~$ kubectl -n kong get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kong-kong-manager NodePort 10.96.224.91 <none> 8002:30270/TCP,8445:30597/TCP 3m38s
kong-kong-proxy LoadBalancer 10.96.43.82 172.18.128.2 80:32608/TCP,443:31650/TCP 3m38s
kong-kong-validation-webhook ClusterIP 10.96.249.53 <none> 443/TCP 3m38s
from kubernetes-ingress-controller.
Related Issues (20)
- Add feature flag to skip consumer sync to Konnect HOT 4
- Improve observability around config sync HOT 4
- Add documentation around sync failure modes
- Prometheus metrics at Path level inside rules
- Efficient Kong upstream slots allocation
- OpenAPI spec for diagnostics server
- Subdomain wildcard certificate domains not working with HTTPS HOT 2
- Fallback configuration is triggered on config update errors that should not cause fallback (e.g. connection refused)
- KIC does not detect newly spawned Gateway Pods and prevents them from getting ready by not sending configuration HOT 4
- Same client certificate in different `Secret`s used in different services causes invalid configuration HOT 2
- Release 2.12.5 HOT 1
- KIC did not release memory in a timely manner when DP was downsized HOT 7
- KIC on Konnect bulletproofing
- Log metadata for Konnect requests and provide KIC metadata with requests to Konnect HOT 1
- Admission webhook rejects objects with duplicate plugin types HOT 1
- Konnect control planes roles cleanup doesn't work
- Release v3.2.1 HOT 3
- Idle TCP connections closes after 60s HOT 1
- [Kong Ingress Controller Chart] High Load on k8s API with KongUpstreamPolicy and Multiple Ingress Controllers HOT 7
- Release v3.2.2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubernetes-ingress-controller.