title: How to assign a static IP to a pod using Kubernetes on deployment
body: <p>I am trying to assign a static IP address to a pod on deployment.</p>
  
  <pre><code>apiVersion: apps/v1beta1
  kind: Deployment
  metadata:
    name: aws-test-mysql
  spec:
    replicas: 1
    template:
      metadata:
        labels:
          app: aws-test-mysql
      spec:
        containers:
        - name: aws-test-mysql
          image: 461677341235123.dkr.ecr.us-east-1.amazonaws.com/aws-test-mysql
          securityContext:
            privileged: true
          ports:
          - containerPort: 3306
            hostIP: 172.20.32.50
            hostPort: 3306
          resources:
            requests:
              cpu: 100m
        imagePullSecrets:
          - name: ecrkey
  </code></pre>
  
  <p>As you can see when I described my pod it is created with another IP.</p>
  
  <pre><code>test-mbp1:aws test$ kubectl describe pods | grep IP
  IP:     100.96.1.3
  </code></pre>
  
  <p>I'm trying to deploy a pod with a static IP on "kind: Deployment" and not as a service.</p>
  
  <p>Is this posible ?</p>