0% found this document useful (0 votes)
19 views5 pages

Ingress Controller

Uploaded by

yaswanthrepalle4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views5 pages

Ingress Controller

Uploaded by

yaswanthrepalle4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

kubectl apply -f https://raw.githubusercontent.

com/kubernetes/ingress-
nginx/controller-0.32.0/deploy/static/provider/aws/deploy.yaml

https://github.com/kubernetes/ingress-nginx

https://medium.com/@madeeshafernando/deploying-multiple-ingress-
controllers-in-a-kubernetes-cluster-dc6c7700a795

ku create deploy deploy1


--image=index.docker.io/sreeharshav/rollingupdate:v1
ku create deploy deploy2
--image=index.docker.io/sreeharshav/rollingupdate:v3
ku create deploy deploy3
--image=index.docker.io/sreeharshav/testcontainer:v1
ku create deploy devopsk8s
--image=index.docker.io/sreeharshav/testcontainer:v1
ku create deploy apple1
--image=index.docker.io/sreeharshav/testcontainer:v1 -n apple
ku expose deploy deploy1 --port=5000 --target-port=80 --type=NodePort
ku expose deploy deploy2 --port=8000 --target-port=80
ku expose deploy deploy3 --port=9000 --target-port=80
ku expose deploy devopsk8s --port=8200 --target-port=80
ku expose deploy apple1 --port=5000 --target-port=80 -n apple

#Multiple services in the namespace can use the same port type but when
we expose using NodePort
#they will have a random node port.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: example-ingress
annotations:
ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: www.sreek8s.xyz
http:
paths:
- path: /
backend:
serviceName: deploy1
servicePort: 5000

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: example-ingress-2
annotations:
ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: app1.sreek8s.xyz
http:
paths:
- path: /
backend:
serviceName: deploy2
servicePort: 8000

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: example-ingress-3
annotations:
ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: app2.sreek8s.xyz
http:
paths:
- path: /
backend:
serviceName: deploy3
servicePort: 9000
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: example-ingress4
annotations:
ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: sreek8s.xyz
http:
paths:
- path: /
backend:
serviceName: deploy1
servicePort: 5000

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: devopsk8s-ingress4
annotations:
ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: www.devopsk8s.xyz
http:
paths:
- path: /
backend:
serviceName: devopsk8s
servicePort: 8200

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: apple-ingress
annotations:
ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: app.devopsk8s.xyz
http:
paths:
- path: /
backend:
serviceName: apple1
servicePort: 8300

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
namespace: apple
name: apple-ingress-2
annotations:
ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: japp.devopsk8s.xyz
http:
paths:
- path: /
backend:
serviceName: apple1
servicePort: 5000

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: apple-ingress-2
annotations:
ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: japp.devopsk8s.xyz
http:
paths:
- path: /
backend:
serviceName: deploy1
servicePort: 5000

You might also like