Untitled

From Commodious Ibis, 7 Years ago, written in YAML, viewed 3 times.
URL https://paste.blessuren.de/view/4282e3c7 Embed
Download Paste or View Raw
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4.   name: hello
  5. spec:
  6.   selector:
  7.     matchLabels:
  8.       app: hello
  9.       tier: backend
  10.       track: stable
  11.   replicas: 7
  12.   template:
  13.     metadata:
  14.       labels:
  15.         app: hello
  16.         tier: backend
  17.         track: stable
  18.     spec:
  19.       containers:
  20.         - name: hello
  21.           image: "gcr.io/google-samples/hello-go-gke:1.0"
  22.           ports:
  23.             - name: http
  24.               containerPort: 80
  25. ---
  26. kind: Service
  27. apiVersion: v1
  28. metadata:
  29.   name: hello
  30. spec:
  31.   selector:
  32.     app: hello
  33.     tier: backend
  34.   ports:
  35.   - protocol: TCP
  36.     port: 80
  37.     targetPort: http
  38. ---
  39. apiVersion: v1
  40. kind: Service
  41. metadata:
  42.   name: frontend
  43. spec:
  44.   selector:
  45.     app: hello
  46.     tier: frontend
  47.   ports:
  48.   - protocol: "TCP"
  49.     port: 80
  50.     nodePort: 30000
  51.   type: NodePort
  52. ---
  53. apiVersion: apps/v1
  54. kind: Deployment
  55. metadata:
  56.   name: frontend
  57. spec:
  58.   selector:
  59.     matchLabels:
  60.       app: hello
  61.       tier: frontend
  62.       track: stable
  63.   replicas: 1
  64.   template:
  65.     metadata:
  66.       labels:
  67.         app: hello
  68.         tier: frontend
  69.         track: stable
  70.     spec:
  71.       containers:
  72.       - name: nginx
  73.         image: "gcr.io/google-samples/hello-frontend:1.0"
  74.         lifecycle:
  75.           preStop:
  76.             exec:
  77.               command: ["/usr/sbin/nginx","-s","quit"]

Reply to "Untitled"

Here you can reply to the paste above