Created
July 16, 2019 02:47
-
-
Save kenmoini/cec001ed6976c7e881110bbe4ed0cf18 to your computer and use it in GitHub Desktop.
K8s nginx Ingress Notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOTES: | |
The nginx-ingress controller has been installed. | |
It may take a few minutes for the LoadBalancer IP to be available. | |
You can watch the status by running 'kubectl --namespace default get services -o wide -w ingress-nginx-ingress-controller' | |
An example Ingress that makes use of the controller: | |
apiVersion: extensions/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 | |
If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided: | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: example-tls | |
namespace: foo | |
data: | |
tls.crt: <base64 encoded cert> | |
tls.key: <base64 encoded key> | |
type: kubernetes.io/tls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment