microscopic-river-74022
08/24/2023, 2:56 AMmicroscopic-river-74022
08/24/2023, 2:57 AMingresses
section of your configuration. The annotations should be an object and are not required by default. Here is an example from the Garden documentation ():
yaml
services:
- ingresses:
- path: /api
port: http
- annotations:
nginx.ingress.kubernetes.io/proxy-body-size: '0'
However, the error message you're seeing suggests that the issue might be with the port
key in the ingresses
section. The error message states that .ingresses[1][port]
is required, which suggests that the port
key is missing from the second ingress in your configuration.
Please ensure that each ingress in your configuration includes a port
key. For example:
yaml
ingresses:
- path: /?(.*)
hostname: ${var.baseHostname}
port: http
If you continue to experience issues, it might be helpful to review the Garden documentation () or open an issue on the Garden GitHub page ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------microscopic-river-74022
08/24/2023, 4:49 AMswift-spring-8620
08/24/2023, 4:49 AMmicroscopic-river-74022
08/24/2023, 4:49 AMDeploy
action in your Garden configuration. Here's an example of how you might do this:
yaml
kind: Deploy
name: ngrok-ingress-controller
description: Install ngrok ingress controller helm chart
type: helm
spec:
chart:
name: ngrok/kubernetes-ingress-controller
version: [VERSION] # specify the version you want to install
repo: <https://ngrok.github.io/kubernetes-ingress-controller>
values:
credentials:
apiKey: [API_KEY]
authtoken: [AUTHTOKEN]
Please replace [VERSION]
, [API_KEY]
, and [AUTHTOKEN]
with the appropriate values for your environment.
This configuration will tell Garden to install the ngrok/kubernetes-ingress-controller
Helm chart from the specified repository. The values
field is used to provide the apiKey
and authtoken
required by the chart.
Please note that this is a general example and might need to be adjusted based on your specific use case and environment. For more detailed information, please refer to the Garden documentation ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------swift-spring-8620
08/24/2023, 4:59 AMmicroscopic-river-74022
08/24/2023, 4:59 AMmicroscopic-river-74022
08/24/2023, 5:00 AMgarden.yml
configuration file and specify the manifests as part of the configuration. Here's an example of how you might do this:
yaml
kind: Module
type: kubernetes
name: game-2048
manifests:
- apiVersion: v1
kind: Service
metadata:
name: game-2048
namespace: ngrok-ingress-controller
spec:
ports:
- name: http
port: 80
targetPort: 80
selector:
app: game-2048
- apiVersion: apps/v1
kind: Deployment
metadata:
name: game-2048
namespace: ngrok-ingress-controller
spec:
replicas: 1
selector:
matchLabels:
app: game-2048
template:
metadata:
labels:
app: game-2048
spec:
containers:
- name: backend
image: alexwhen/docker-2048
ports:
- name: http
containerPort: 80
- apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: game-2048-ingress
namespace: ngrok-ingress-controller
spec:
ingressClassName: ngrok
rules:
- host: NGROK_DOMAIN
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: game-2048
port:
number: 80
This configuration tells Garden to apply the specified Kubernetes manifests. Note that you might need to replace NGROK_DOMAIN
with the actual domain you want to use.
For more detailed information, please refer to the Garden documentation ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------swift-spring-8620
08/24/2023, 5:07 AMmicroscopic-river-74022
08/24/2023, 5:07 AMmicroscopic-river-74022
08/24/2023, 5:07 AMsetupIngressController
flag to nginx
. Alternatively, you can set up your own ingress controller, e.g. using Traefik, Ambassador, or Istio. You can find an example for using Garden with Istio in the examples directory ().
yaml
providers:
- name: kubernetes
setupIngressController: nginx
2. **Configure DNS and TLS**: You'll also need to point one or more DNS entries to your cluster, and configure a TLS certificate for the hostnames you will expose for ingress. Templating the ingress to the application enables you to have DNS entries for every developer's namespace. First, you will make DNS CNAME entry that points to the load balancer in front of your cluster. We recommend setting a wildcard in front of the proper record, e.g. *...com. If you would like to manage TLS for development environments, we recommend using your cloud provider's certificate management service in combination with a load balancer.
3. **Configure the Ingress Class**: If you have multiple ingress controllers in your cluster, you can specify the ingress class or ingressClassName to use on configured Ingresses (via the kubernetes.io/ingress.class
annotation or spec.ingressClassName
field depending on the kubernetes version) when deploying container
services.
yaml
providers:
- name: kubernetes
ingressClass: nginx
4. **Configure the Ingress Ports**: You can also specify the external HTTP and HTTPS ports of the cluster's ingress controller using the ingressHttpPort
and ingressHttpsPort
configuration keys.microscopic-river-74022
08/24/2023, 5:07 AMyaml
providers:
- name: kubernetes
ingressHttpPort: 80
ingressHttpsPort: 443
Please note that these are general steps and might need to be adjusted based on your specific use case and environment. For more detailed information, please refer to the Garden documentation ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------swift-spring-8620
08/24/2023, 10:10 PMmicroscopic-river-74022
08/24/2023, 10:10 PMmicroscopic-river-74022
08/24/2023, 10:10 PMuninstall-garden-services
command from the Garden Kubernetes plugin. Here's how you can do it:
bash
garden plugins kubernetes uninstall-garden-services
This command will uninstall all Garden system services, including the Nginx Ingress Controller. Please note that this will also uninstall other system services like the build sync service, so you should only run this if you're sure you want to remove all Garden system services.
For more detailed information, please refer to the Garden troubleshooting documentation ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------swift-spring-8620
08/24/2023, 10:17 PMmicroscopic-river-74022
08/24/2023, 10:17 PMmicroscopic-river-74022
08/24/2023, 10:17 PM