Advertisement
Guest User

Untitled

a guest
May 21st, 2018
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.64 KB | None | 0 0
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4.   name: nginx-behind-nat
  5. spec:
  6.   selector:
  7.     matchLabels:
  8.       run: nginx-behind-nat
  9.   replicas: 1
  10.   template:
  11.     metadata:
  12.       labels:
  13.         run: nginx-behind-nat
  14.     spec:
  15.       containers:
  16.       - name: nginx-behind-nat
  17.         image: nginx
  18.         ports:
  19.         - containerPort: 80
  20.       nodeSelector:
  21.         kubernetes.io/hostname: node2
  22. ---
  23. apiVersion: v1
  24. kind: Service
  25. metadata:
  26.   name: nginx-behind-nat
  27.   labels:
  28.     run: nginx-behind-nat
  29. spec:
  30.   ports:
  31.   - port: 80
  32.     protocol: TCP
  33.     targetPort: 80
  34.   selector:
  35.     run: nginx-behind-nat
  36.   type: NodePort
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement