k8s 配置
程序员文章站
2022-07-13 10:10:14
...
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: k8s-eureka
spec:
replicas: 2
template:
metadata:
labels:
app: web
spec:
containers:
- name: front-end
image: nginx
ports:
- containerPort: 80
- name: flaskapp-demo
image: registry.cn-zhangjiakou.aliyuncs.com/icezhang/eureka
ports:
- containerPort: 8761
apiVersion: v1
kind: Service
metadata:
labels:
run: nginx
name: eureka
namespace: default
spec:
ports:
- port: 8761
targetPort: 8761
selector:
app: web
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: eureka-ingress
spec:
rules:
- host: eureka.com
http:
paths:
- backend:
serviceName: eureka
servicePort: 8761
上一篇: k8s启动单机influxdb
下一篇: 机器学习(自然语言处理)—表的处理