Skip to content

Instantly share code, notes, and snippets.

@onuryilmaz
Last active October 8, 2017 17:45
Show Gist options
  • Save onuryilmaz/5e4998accfe0630f9c98d7ab30b8c244 to your computer and use it in GitHub Desktop.
Save onuryilmaz/5e4998accfe0630f9c98d7ab30b8c244 to your computer and use it in GitHub Desktop.
Run a Domain with Ingress
kubectl create -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/examples/deployment/default-backend.yaml
kubectl create -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/examples/deployment/nginx-ingress-controller.yaml
kubectl run ingress-pod --image=nginx --port 80
kubectl expose deployment ingress-pod --port=80 --target-port=80 --type=NodePort
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress-service
spec:
rules:
- host: "onuryilmaz.me"
http:
paths:
- backend:
serviceName: ingress-pod
servicePort: 80
kubectl run -it client2 --image=tutum/curl
curl -I -L --resolve onuryilmaz.me:<IP> http://onuryilmaz.me/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment