arshad75

docker-python-k8s

Apr 16th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: python-app-<your-name>
  5. spec:
  6. selector:
  7. matchLabels:
  8. run: python-app-<your-name>
  9. replicas: 2
  10. template:
  11. metadata:
  12. labels:
  13. run: python-app-<your-name>
  14. spec:
  15. containers:
  16. - name: python-app-<your-name>
  17. image: lovescloud/docker-python:latest
  18. ports:
  19. - name: port4000
  20. containerPort: 4000
  21. ---
  22. apiVersion: v1
  23. kind: Service
  24. metadata:
  25. name: python-app-<your-name>
  26. labels:
  27. run: python-app-<your-name>
  28. spec:
  29. type: NodePort
  30. ports:
  31. - name: port4000
  32. port: 4000
  33. protocol: TCP
  34. selector:
  35. run: python-app-<your-name>
Add Comment
Please, Sign In to add comment