Skip to content

Instantly share code, notes, and snippets.

@vishnuhd
Last active September 18, 2019 06:31
Show Gist options
  • Save vishnuhd/2825099ffb651e5394b39a7574ac8c8e to your computer and use it in GitHub Desktop.
Save vishnuhd/2825099ffb651e5394b39a7574ac8c8e to your computer and use it in GitHub Desktop.
Nginx Ingress | Docker for Mac

Nginx Ingress | Docker for Mac

  • The following Mandatory Command is required for all deployments
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml
  • Docker for Mac Kubernetes is available in Docker for Mac (from version 18.06.0-ce)

    Create a service

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml
  • Nginx Ingress resource sample
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: example-ingress
  annotations:
    ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
        - path: /apple
          backend:
            serviceName: apple-service
            servicePort: 5678
        - path: /banana
          backend:
            serviceName: banana-service
            servicePort: 5678

References :

https://github.com/kubernetes/ingress-nginx/blob/master/docs/deploy/index.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment