36 строки
582 B
YAML
36 строки
582 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: ai-k8s-webapi
|
|
labels:
|
|
app: ai-k8s-webapi
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: webapi
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: webapi
|
|
spec:
|
|
containers:
|
|
- name: ai-k8s-oc
|
|
image: dockerhubaccount/ai-k8s-oc:0.0.1
|
|
ports:
|
|
- containerPort: 80
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: ai-k8s-oc-webapi-svc
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app: webapi
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|
|
nodePort: 30007
|