httpbin-nodeport.yaml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright Istio Authors
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. ##################################################################################################
  15. # httpbin service
  16. ##################################################################################################
  17. apiVersion: v1
  18. kind: Service
  19. metadata:
  20. name: httpbin
  21. labels:
  22. app: httpbin
  23. spec:
  24. type: NodePort
  25. ports:
  26. - name: http
  27. port: 8000
  28. targetPort: 80
  29. selector:
  30. app: httpbin
  31. ---
  32. apiVersion: apps/v1
  33. kind: Deployment
  34. metadata:
  35. name: httpbin
  36. spec:
  37. replicas: 1
  38. selector:
  39. matchLabels:
  40. app: httpbin
  41. version: v1
  42. template:
  43. metadata:
  44. labels:
  45. app: httpbin
  46. version: v1
  47. spec:
  48. containers:
  49. - image: docker.io/kennethreitz/httpbin
  50. imagePullPolicy: IfNotPresent
  51. name: httpbin
  52. ports:
  53. - containerPort: 80