arshad75

arshad-deployment_service.yaml

Jan 27th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: <your-name>-deployment
  5. spec:
  6. selector:
  7. matchLabels:
  8. app: <your-name>-app
  9. replicas: 2 # tells deployment to run 2 pods matching the template
  10. template:
  11. metadata:
  12. labels:
  13. app: <your-name>-app
  14. spec:
  15. containers:
  16. - name: <your-name>-container
  17. image: lovescloud/rildemo:DO
  18. ports:
  19. - containerPort: 80
  20. ---
  21.  
  22. apiVersion: v1
  23. kind: Service
  24. metadata:
  25. name: <your-name>-service
  26. namespace: default
  27. spec:
  28. ports:
  29. - port: 80
  30. protocol: TCP
  31. targetPort: 80
  32. selector:
  33. app: <your-name>-app
  34. type: NodePort
Add Comment
Please, Sign In to add comment