123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- ---
- apiVersion: v1
- kind: Pod
- metadata:
- name: nginx
- labels:
- app.kubernetes.io/name: proxy
- spec:
- containers:
- - name: nginx
- image: nginx:1.22
- ports:
- - containerPort: 80
- name: http-web-svc
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: nginx-service
- spec:
- selector:
- app.kubernetes.io/name: proxy
- type: ClusterIP
- ports:
- - name: nginx-service-port
- protocol: TCP
- port: 80
- targetPort: http-web-svc
- ---
- apiVersion: traefik.containo.us/v1alpha1
- kind: IngressRoute
- metadata:
- name: nginx
- spec:
- entryPoints:
- - websecure
- routes:
- - kind: Rule
- match: Host(`nginx.example.com`)
- services:
- - kind: Service
- name: nginx-service
- port: 80
|