You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/ninja-workshops/8-docker-k8s-otel/8-deploy-app-k8s.md
+40-23Lines changed: 40 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,6 +128,36 @@ spec:
128
128
> [!tip]- What is a Service in Kubernetes?
129
129
> A Service in Kubernetes is an abstraction layer, working like a middleman, giving you a fixed IP address or DNS name to access your Pods, which stays the same, even if Pods are added, removed, or replaced over time.
130
130
131
+
Then, create a second file in the same directory named `service.yaml`:
132
+
133
+
``` bash
134
+
vi /home/splunk/ingress.yaml
135
+
```
136
+
137
+
And paste in the following:
138
+
139
+
``` yaml
140
+
apiVersion: networking.k8s.io/v1
141
+
kind: Ingress
142
+
metadata:
143
+
name: helloworld-ingress
144
+
annotations:
145
+
traefik.ingress.kubernetes.io/router.entrypoints: web
146
+
spec:
147
+
ingressClassName: traefik
148
+
rules:
149
+
- host: helloworld.localhost
150
+
http:
151
+
paths:
152
+
- path: /
153
+
pathType: Prefix
154
+
backend:
155
+
service:
156
+
name: helloworld
157
+
port:
158
+
number: 8080
159
+
```
160
+
131
161
We can then use these manifest files to deploy our application:
0 commit comments