title: EDIT : how to make a service with active/passive option to choose only a master pod?
body: <p>if i have this deployment file &amp; its service :</p>
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: nix
    labels:
      app: nix-app
      name: nix
  spec:
    replicas: 2
    selector:
      matchLabels:
        app: nix-app
        name: nix
    template:
      metadata:
        name: nix
        labels:
          app: nix-app
          name: nix
      spec:
        containers:
        - name: nix
          image: nginx
          ports:
            - containerPort: 8000
          imagePullPolicy: Always
  ---
  apiVersion: v1
  kind: Service
  metadata:
    name: svc
    labels:
      name:  svc
      app: nix-app
  spec:
    type: ClusterIP
    ports:
     - port: 8000
       targetPort: 8000
    selector:
       app: nix-app
       name: nix
       
  </code></pre>
  <p>and I want to make the service with an option to choose one pod as a master and the other being passive and if the master has been terminated the passive will work.  any idea? tnx</p>