周志洋

个人站

持续学习 才能不被淘汰


Python DevOps-Kubernetes部署

Deployment 配置

apiVersion: apps/v1
kind: Deployment
metadata:
 name: python-app
spec:
 replicas: 3
 selector:
   matchLabels:
     app: python-app
 template:
   metadata:
     labels:
       app: python-app
   spec:
     containers:
     - name: python-app
       image: myapp:latest
       ports:
       - containerPort: 8000

Service 配置

apiVersion: v1
kind: Service
metadata:
 name: python-app-service
spec:
 selector:
   app: python-app
 ports:
 - port: 80
   targetPort: 8000
 type: LoadBalancer


转载请注明:周志洋的博客 » Python DevOps-Kubernetes部署

打赏一个呗

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦