microscopic-river-74022
08/24/2023, 10:18 PMmicroscopic-river-74022
08/24/2023, 10:18 PMsetupIngressController flag to nginx or to your own choice of ingress controller such as Traefik, Ambassador, or Istio.
Here is an example of how to set the setupIngressController flag:
yaml
providers:
- setupIngressController: nginx
If you want to skip installing or enabling the nginx ingress controller, you can set setupIngressController to null or false.
yaml
providers:
- setupIngressController: null
Remember to update your configuration based on your specific needs. For more detailed information, you may want to refer to the official Garden documentation here () and here ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
08/24/2023, 10:32 PMswift-spring-8620
08/24/2023, 10:32 PMmicroscopic-river-74022
08/24/2023, 10:32 PMngrok-ingress-controller that you've specified in your provider configuration is not found in your Kubernetes cluster. This could be due to the Ingress Controller not being properly set up.
In the Garden Kubernetes provider configuration, you can specify the ingressClass or ingressClassName to use on configured Ingresses when deploying container services. This is particularly useful if you have multiple ingress controllers in your cluster. Here's an example:
yaml
providers:
- ingressClass: ngrok-ingress-controller
However, the ingressClass you specify must match an existing IngressClass resource in your Kubernetes cluster. If the IngressClass resource does not exist, you will encounter the error you're seeing.
To resolve this issue, you need to ensure that the ngrok-ingress-controller IngressClass resource exists in your Kubernetes cluster. You can check the existing IngressClass resources in your cluster by running the following command:
bash
kubectl get ingressclass
If the ngrok-ingress-controller is not listed, you will need to properly set it up. The setup process can vary depending on the specific ingress controller you're using. You may need to refer to the specific documentation or setup guide for the ngrok-ingress-controller.
For more information on how to configure the ingressClass in Garden, you can refer to the official Garden documentation here ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------swift-spring-8620
08/24/2023, 11:02 PMmicroscopic-river-74022
08/24/2023, 11:02 PMmicroscopic-river-74022
08/24/2023, 11:03 PMport key under ingresses is not correctly indented. In YAML, indentation is crucial as it determines the relationships between different keys.
In your case, the port key should be at the same level as path and hostname under ingresses. Here's how it should look:
yaml
kind: Deploy
description: The php container
name: php-fpm
type: container
build: php-fpm
dependencies:
- deploy.redis
spec:
ports:
- name: http
protocol: TCP
containerPort: 9000
sync:
paths:
- target: /var/www/html
source: ../../src
mode: two-way
ingresses:
- annotations:
nginx.ingress.kubernetes.io/rewrite-target: /index.php?$2
nginx.ingress.kubernetes.io/add-base-url: "true"
nginx.ingress.kubernetes.io/backend-protocol: "FASTCGI"
nginx.ingress.kubernetes.io/fastcgi-index: "index.php"
nginx.ingress.kubernetes.io/fastcgi-params-configmap: "php-fpm-fastcgi-configmap"
# Add other annotations as required
path: /(.*\.php)(/.*)?
hostname: ${var.baseHostname}
port: http
Please note that the port key under ingresses should match one of the name values under ports. In your case, it's http.
For more information on how to configure ingresses in Garden, you can refer to the official Garden documentation here ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------swift-spring-8620
08/25/2023, 2:31 AMmicroscopic-river-74022
08/25/2023, 2:31 AMmicroscopic-river-74022
08/25/2023, 2:32 AMgarden get status command to check the status of your services. Make sure that all your services, including php-fpm and redis, are running as expected.
2. **Check the logs**: Use the garden logs command to check the logs of your services. This might give you more information about what's causing the 503 error.
3. **Health checks**: You might want to add a health check for your php-fpm service. This can help Garden know when your service is ready to receive requests. Here's an example of how to add a health check:microscopic-river-74022
08/25/2023, 2:32 AMyaml
kind: Deploy
description: The php container
name: php-fpm
type: container
build: php-fpm
dependencies:
- deploy.redis
spec:
ports:
- name: http
protocol: TCP
containerPort: 9000
sync:
paths:
- target: /var/www/html
source: ../../src
mode: two-way
healthCheck:
httpGet:
path: /health
port: http
initialDelaySeconds: 10
timeoutSeconds: 5
ingresses:
- annotations:
nginx.ingress.kubernetes.io/rewrite-target: /index.php?$2
nginx.ingress.kubernetes.io/add-base-url: "true"
nginx.ingress.kubernetes.io/backend-protocol: "FASTCGI"
nginx.ingress.kubernetes.io/fastcgi-index: "index.php"
nginx.ingress.kubernetes.io/fastcgi-params-configmap: "php-fpm-fastcgi-configmap"
# Add other annotations as required
path: /
hostname: ${var.baseHostname}
port: http
In this example, Garden will send an HTTP GET request to the /health endpoint on the http port of your service. If the service responds with a status code between 200 and 399, it's considered healthy. You'll need to adjust the path and port to match your actual health check endpoint.
4. **Check your PHP-FPM configuration**: Make sure that your PHP-FPM is correctly configured to handle requests. This includes checking the listen directive in your PHP-FPM pool configuration and ensuring that PHP-FPM is correctly configured to work with NGINX.microscopic-river-74022
08/25/2023, 2:32 AM