nginx.yaml 714 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ---
  2. apiVersion: v1
  3. kind: Pod
  4. metadata:
  5. name: nginx
  6. labels:
  7. app.kubernetes.io/name: proxy
  8. spec:
  9. containers:
  10. - name: nginx
  11. image: nginx:1.22
  12. ports:
  13. - containerPort: 80
  14. name: http-web-svc
  15. ---
  16. apiVersion: v1
  17. kind: Service
  18. metadata:
  19. name: nginx-service
  20. spec:
  21. selector:
  22. app.kubernetes.io/name: proxy
  23. type: ClusterIP
  24. ports:
  25. - name: nginx-service-port
  26. protocol: TCP
  27. port: 80
  28. targetPort: http-web-svc
  29. ---
  30. apiVersion: traefik.containo.us/v1alpha1
  31. kind: IngressRoute
  32. metadata:
  33. name: nginx
  34. spec:
  35. entryPoints:
  36. - websecure
  37. routes:
  38. - kind: Rule
  39. match: Host(`nginx.example.com`)
  40. services:
  41. - kind: Service
  42. name: nginx-service
  43. port: 80