This commit is contained in:
Eason(G Ray)
2024-06-28 13:43:34 +08:00
commit 14df1fb03b
11 changed files with 379 additions and 0 deletions

31
hello-world/service.yml Normal file
View File

@ -0,0 +1,31 @@
apiVersion: v1
kind: Service
metadata:
name: hello-world
spec:
ports:
- name: web
port: 80
targetPort: web
selector:
app: hello-world
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hello-world-ingress
spec:
ingressClassName: traefik
rules:
- host: hello-world.k8s.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: hello-world
port:
name: web