Skip to content

Commit

Permalink
add clusterip to services
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeptossss committed Oct 3, 2023
1 parent a711420 commit 5b699f4
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 45 deletions.
5 changes: 0 additions & 5 deletions poll.ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ kind: Ingress
metadata:
name: poll-ingress
namespace: default
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web
kubernetes.io/ingress.class: traefik
traefik.frontend.rule.type: PathPrefixStrip
spec:
ingressClassName: traefik
rules:
- host: poll.dop.io
http:
Expand Down
1 change: 1 addition & 0 deletions poll.service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
labels:
app: poll
spec:
type: ClusterIP
ports:
- name: http
port: 80
Expand Down
5 changes: 0 additions & 5 deletions result.ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ kind: Ingress
metadata:
name: result-ingress
namespace: default
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web
kubernetes.io/ingress.class: traefik
traefik.frontend.rule.type: PathPrefixStrip
spec:
ingressClassName: traefik
rules:
- host: result.dop.io
http:
Expand Down
1 change: 1 addition & 0 deletions result.service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
labels:
app: result
spec:
type: ClusterIP
ports:
- name: http
port: 80
Expand Down
8 changes: 1 addition & 7 deletions traefik.deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller

---
kind: Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: traefik
namespace: kube-public
Expand Down
9 changes: 8 additions & 1 deletion traefik.rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,11 @@ roleRef:
subjects:
- kind: ServiceAccount
name: traefik-ingress-controller
namespace: default
namespace: kube-public

---
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller
namespace: kube-public
61 changes: 34 additions & 27 deletions traefik.service.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,49 @@
apiVersion: v1
kind: Service
kind: ServiceAccount
metadata:
name: traefik
name: traefik-ingress-controller
namespace: kube-public

spec:
externalTrafficPolicy: Local
type: LoadBalancer
ports:
- name: web
targetPort: 80
port: 80
protocol: TCP
- name: admin
targetPort: 8080
port: 8080
protocol: TCP
selector:
app: traefik
#---
---
#apiVersion: v1
#kind: Service
#metadata:
# name: traefik-dashboard-service
# name: traefik
# namespace: kube-public
#
#spec:
# type: NodePort
# externalTrafficPolicy: Local
# type: LoadBalancer
# ports:
# - name: proxy
# protocol: TCP
# port: 80
# - name: web
# targetPort: 80
# nodePort: 30021
# - name: admin
# port: 80
# protocol: TCP
# port: 8080
# - name: admin
# targetPort: 8080
# nodePort: 30042
# port: 8080
# protocol: TCP
# selector:
# app: traefik
# app: traefik
#---
apiVersion: v1
kind: Service
metadata:
name: traefik-service
namespace: kube-public

spec:
type: NodePort
ports:
- name: proxy
protocol: TCP
port: 80
targetPort: 80
nodePort: 30021
- name: admin
protocol: TCP
port: 8080
targetPort: 8080
nodePort: 30042
selector:
app: traefik

0 comments on commit 5b699f4

Please sign in to comment.