ingress-nginx
ingress-nginx copied to clipboard
How to use StorageBucket resource with ingress nginx on GCP?
K8s documentation shows that StorageBucket resource can easily be configured for an ingress (v1.19+). However I did not find any example how to make it work with ingress-nginx on GKE. Is there any piece of puzzle missing? Is it possible or is it not yet ready to use like that?
https://github.com/kubernetes/ingress-nginx/issues/1809
@toredash thank you for your response.
I have seen the issue. I have also seen #33 on ingress-gce but both are pretty old and StorageBucket resource is new feature. I just hoped it can be used out of the box but it is not well documented yet.
Can anybody shed a light on it?
Something like this ?
apiVersion: v1
kind: Service
metadata:
name: googlestoragebucket
spec:
externalName: storage.googleapis.com
ports:
- name: https
port: 443
protocol: TCP
targetPort: 443
type: ExternalName
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/rewrite-target: /<bucketnameingoogle>/$1
name: googlestorage
spec:
rules:
- host: your.domain.info
http:
paths:
- backend:
serviceName: googlestoragebucket
servicePort: 443
path: /(.+)
This is course assume your bucket is public. Need tio m
@toredash thank you for your help, but my question is regarding StorageBucket resource not the way it was done before kubernetes v1.19. In the first link you can find an example:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-resource-backend
spec:
defaultBackend:
resource:
apiGroup: k8s.example.com
kind: StorageBucket
name: static-assets
rules:
- http:
paths:
- path: /icons
pathType: ImplementationSpecific
backend:
resource:
apiGroup: k8s.example.com
kind: StorageBucket
name: icon-assets
I'm not sure if this is supported in ingress-nginx at all, sorry. The code i provided above should work though expose resources in the bucket.
@jkabat , you found any example usage this api ?
@KiPSOFT unfortunately not. I had to use old service way to use GCS bucket...
I'm in the dark also, I thought that apiGroup: k8s.example.com
might be storage.googleapis.com
but I'm really lost as to what it should be.
Has there been any resolution on this issue? I have been trying to update my current GKE ingress controller to point to a GCS bucket. Cluster has been updated to 1.19.9-gke.140. Every time I attempt to use the example posted by jkabat I keep getting the following error?
invalid ingress spec: could not find service "default/"; could not find service "default/
I do have a service created that interacts fine with my ingress controller. Normally you point at the correct service, but I have not found an example for interacting with a StorageBucket. Is there an additional service that needs to be created and pointed at? If so, what key needs to be added to Bucket resource.
EX: of ingress working fine with service paths: - path: /* backend: serviceName: qa-example servicePort: 8050
@jprogramtech as far as I know kind: StorageBucket is still not supported by ingress-nginx.
It sounds it is yet need to implement: https://issuetracker.google.com/issues/182815525?pli=1
Unless kind: StorageBucket
comes as custom resource from nginx
controller. Is there any guru who can confirm that?
/help
@iamNoah1: This request has been marked as needing help from a contributor.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
In response to this:
/help
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
@rikatz @strongjz can you clarify?
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/assign @strongjz
/triage accepted /priority backlog
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
/remove-lifecycle rotten
On Thu, May 12, 2022 at 5:00 AM Kubernetes Triage Robot < @.***> wrote:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity, lifecycle/stale is applied
- After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
- After 30d of inactivity since lifecycle/rotten was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with /remove-lifecycle rotten
- Close this issue or PR with /close
- Offer to help out with Issue Triage https://www.kubernetes.dev/docs/guide/issue-triage/
Please send feedback to sig-contributor-experience at kubernetes/community https://github.com/kubernetes/community.
/lifecycle rotten
— Reply to this email directly, view it on GitHub https://github.com/kubernetes/ingress-nginx/issues/6875#issuecomment-1124715955, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMAT4FMUS26TD25O5VNDEDVJTCDTANCNFSM4XVHBX6A . You are receiving this because you commented.Message ID: @.***>
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Reopen this issue with
/reopen
- Mark this issue as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied- After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied- After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closedYou can:
- Reopen this issue with
/reopen
- Mark this issue as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.