47 lines
834 B
YAML
47 lines
834 B
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: newapi-external
|
|
namespace: default
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 3000
|
|
targetPort: 3000
|
|
protocol: TCP
|
|
name: http
|
|
---
|
|
apiVersion: discovery.k8s.io/v1
|
|
kind: EndpointSlice
|
|
metadata:
|
|
name: newapi-external
|
|
namespace: default
|
|
labels:
|
|
kubernetes.io/service-name: newapi-external
|
|
addressType: IPv4
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 3000
|
|
endpoints:
|
|
- addresses:
|
|
- "118.196.32.29"
|
|
|
|
---
|
|
# Kevisual - newapi.kevisual.cn (支持 WebSocket)
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: newapi-https
|
|
namespace: default
|
|
spec:
|
|
entryPoints:
|
|
- websecure
|
|
routes:
|
|
- match: Host(`newapi.kevisual.cn`)
|
|
kind: Rule
|
|
services:
|
|
- name: newapi-external
|
|
port: 3000
|
|
tls:
|
|
certResolver: letsencrypt |