I want to update the ingress configuration and which will apply on ingress instance running on kuberntes cluter on gcloud.
For this I have performed two steps:
ingress.yml
and then re-create ingress will solve the issue mentioned on this.kubernetes.io/ingress.class: "gce"
nginx.ingress.kubernetes.io/proxy-body-size: 20m
After deleting the ingress from cluster and create the ingress again also declared me unlucky.
ingress.yml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: my-ingress
namespace: default
annotations:
kubernetes.io/ingress.class: "gce"
nginx.ingress.kubernetes.io/proxy-body-size: 20m
nginx.org/client-max-body-size: "20m"
nginx-config.yml
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
namespace: default
data:
proxy-body-size: "20m"
So how can I update my ingress properties such as annotation nginx.ingress.kubernetes.io/proxy-body-size
, so that I can upload data more than 1 MB (where my cluster deployed on GKE)?
Any help would be appreciated. Thanks
You are misinterpreting the annotations part in your Ingress
resource. Let me elaborate on that.
The problem is that you trying to use GCE controller and apply annotations specifically for NGINX Ingress controller. You cannot use NGINX Ingress controller annotations with GCE controller.
For your configuration to work you would need to deploy NGINX Ingress controller.
You can deploy it by following official documentation.
After deploying NGINX Ingress controller the part of the Ingress
definition should look like that:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: my-ingress
namespace: default
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/proxy-body-size: "20m"
Take a specific look at part below:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/proxy-body-size: "20m"
Please refer to official documentation when applying annotations for NGINX Ingress controller.