arshad75

docker-dotnet-k8s

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