Editing Kind: Ingress
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 7: | Line 7: | ||
* <code>[[helm install my-release ingress-nginx/ingress-nginx]]</code> | * <code>[[helm install my-release ingress-nginx/ingress-nginx]]</code> | ||
* <code>[[minikube addons enable ingress]]</code> | * <code>[[minikube addons enable ingress]]</code> | ||
− | * | + | * [[spec.rules.host]] |
− | * | + | * rules: [ [[http:]] | [[hosts:]] ] |
− | |||
− | |||
== Official examples == | == Official examples == | ||
− | + | [[apiVersion: networking.k8s.io/v1]] | |
+ | [[kind: Ingress]] | ||
+ | metadata: | ||
+ | name: minimal-ingress | ||
+ | [[annotations:]] | ||
+ | [[nginx.ingress.kubernetes.io]]/rewrite-target: / | ||
+ | spec: | ||
+ | [[ingressClassName]]: nginx-example | ||
+ | rules: | ||
+ | - http: | ||
+ | paths: | ||
+ | - path: /testpath | ||
+ | pathType: Prefix | ||
+ | backend: | ||
+ | service: | ||
+ | name: test | ||
+ | port: | ||
+ | number: 80 | ||
https://kind.sigs.k8s.io/docs/user/ingress/ | https://kind.sigs.k8s.io/docs/user/ingress/ | ||
− | apiVersion: | + | apiVersion: networking.k8s.io/v1 |
kind: Ingress | kind: Ingress | ||
metadata: | metadata: | ||
Line 29: | Line 44: | ||
path: /foo(/|$)(.*) | path: /foo(/|$)(.*) | ||
backend: | backend: | ||
− | + | service: | |
name: foo-service | name: foo-service | ||
port: | port: | ||
Line 40: | Line 55: | ||
port: | port: | ||
number: 8080 | number: 8080 | ||
− | |||
− | |||
− | |||
− | |||
== Examples == | == Examples == | ||
− | + | apiVersion: [[networking.k8s.io/v1beta1]] | |
− | + | kind: Ingress | |
− | + | metadata: | |
− | + | annotations: | |
− | + | [[kubernetes.io/ingress.class]]: nginx | |
− | + | name: example | |
+ | namespace: foo | ||
+ | spec: | ||
+ | rules: | ||
+ | - host: www.example.com | ||
+ | http: | ||
+ | paths: | ||
+ | - backend: | ||
+ | serviceName: exampleService | ||
+ | servicePort: 80 | ||
+ | path: / | ||
+ | # This section is only required if TLS is to be enabled for the Ingress | ||
+ | [[tls:]] | ||
+ | - hosts: | ||
+ | - www.example.com | ||
+ | [[secretName:]] example-tls | ||
Line 75: | Line 101: | ||
servicePort: 8080 | servicePort: 8080 | ||
path: / | path: / | ||
+ | |||
== Errors == | == Errors == | ||
Line 97: | Line 124: | ||
The Ingress "youingress" is invalid: [[spec.rules]][0].http.paths[0].backend: Required value: port name or number is required | The Ingress "youingress" is invalid: [[spec.rules]][0].http.paths[0].backend: Required value: port name or number is required | ||
− | |||
− | |||
== Errors == | == Errors == | ||
Line 112: | Line 137: | ||
* <code>[[cattle.io/creator: norman]]</code> | * <code>[[cattle.io/creator: norman]]</code> | ||
* <code>[[.local]]</code> | * <code>[[.local]]</code> | ||
− | * | + | * [[Address:]] |
* <code>[[kubectl apply -f ingress.yaml]]</code> | * <code>[[kubectl apply -f ingress.yaml]]</code> | ||
− | * | + | * [[Ingress-nginx-controller ConfigMap]] |
− | |||
− | |||
− | |||
== See also == | == See also == |
Advertising: