<p>My deployment is about Wordpress and MYsql. I already defined a new pool and a new namespace and I was trying to make that my pods get an ip address from this new pool defined but they never get one.</p>
<p>My namespace file yaml</p>
<pre><code>apiVersion: v1
kind: Namespace
metadata:
  name: produccion
  annotations:
    cni.projectcalico.org/ipv4pools: ippool
</code></pre>
<p>my pool code</p>
<pre><code>calicoctl create -f -&lt;&lt;EOF
apiVersion: projectcalico.org/v3
kind: IPPool
metadata:
   name: ippool
spec:
   cidr: 192.169.0.0/24
   blockSize: 29
   ipipMode: Always
   natOutgoing: true
EOF
</code></pre>
<p>My mysql deployment is</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: wordpress-mysql   
  namespace: produccion
  labels:                 
    app: wordpress
spec:
  ports:
    - port: 3306
      targetPort: 3306
      nodePort: 31066
  selector:
    app: wordpress
    tier: mysql
  type: NodePort
---
apiVersion:  apps/v1
kind: Deployment
metadata:
  name: wordpress-mysql
  namespace: produccion
  annotations:
    cni.projectcalico.org/ipv4pools: ippool
  labels:
    app: wordpress
spec:
  selector:
    matchLabels:
      app: wordpress
      tier: mysql
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: wordpress
        tier: mysql
    spec:
      containers:
      - image: mysql
        name: mysql
        env:
        - name: MYSQL_ROOT_PASSWORD
          value: PASS
        ports:
        - containerPort: 3306
          name: mysql
        volumeMounts:
        - name: mysql-persistent-storage 
          mountPath: &quot;/var/lib/mysql&quot;
      volumes:
      - name: mysql-persistent-storage 
        persistentVolumeClaim:
          claimName: mysql-pv-claim
</code></pre>
<p>My wordpress deployment</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: wordpress
  namespace: produccion
  labels:
    app: wordpress
spec:
  ports:
    - port: 80
      nodePort: 30999
  selector:
    app: wordpress
    tier: frontend
  type: NodePort
---
apiVersion: apps/v1 
kind: Deployment
metadata:
  name: wordpress
  namespace: produccion
  labels:
    app: wordpress
spec:
  selector:
    matchLabels:
      app: wordpress
      tier: frontend
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: wordpress
        tier: frontend
    spec:
      containers:
      - image: wordpress
        name: wordpress
        env:
        - name: WORDPRESS_DB_NAME
          value: wordpress
        - name: WORDPRESS_DB_HOST
          value: IP_Address:31066
        - name: WORDPRESS_DB_USER
          value: root
        - name: WORDPRESS_DB_PASSWORD
          value: PASS
        ports:
        - containerPort: 80
          name: wordpress
        volumeMounts:
        - name: wordpress-persistent-storage
          mountPath: &quot;/var/www/html&quot;          
      volumes:
      - name: wordpress-persistent-storage
        persistentVolumeClaim:
          claimName: wordpress-persistent-storage
</code></pre>
<p>Additionally, I have also two PV yaml file for each service (mysql and wordpress).</p>
<p>When I execute the Kubectl of any deployment, they stay on <strong>ContainerCreating</strong> and the IP column stay on <strong>none</strong>.</p>
<pre><code>produccion             wordpress-mysql-74578f5d6d-knzzh             0/1     ContainerCreating   0          70m    &lt;none&gt;           dockerc8.tecsinfo-ec.com 
</code></pre>
<p>If I check this pod I get the next errors:</p>
<pre><code>Normal   Scheduled               88s                             default-scheduler  Successfully assigned produccion/wordpress-mysql-74578f5d6d-65jvt to dockerc8.tecsinfo-ec.com
  Warning  FailedCreatePodSandBox  &lt;invalid&gt;                       kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;cdb1460246562cac11a57073ab12489dc169cb72aa3371cb2e72489544812a9b&quot; network for pod &quot;wordpress-mysql-74578f5d6d-65jvt&quot;: networkPlugin cni failed to set up pod &quot;wordpress-mysql-74578f5d6d-65jvt_produccion&quot; network: invalid character 'i' looking for beginning of value
  Warning  FailedCreatePodSandBox  &lt;invalid&gt;                       kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;672a2c35c2bb99ebd5b7d180d4426184613c87f9bc606c15526c9d472b54bd6f&quot; network for pod &quot;wordpress-mysql-74578f5d6d-65jvt&quot;: networkPlugin cni failed to set up pod &quot;wordpress-mysql-74578f5d6d-65jvt_produccion&quot; network: invalid character 'i' looking for beginning of value
  Warning  FailedCreatePodSandBox  &lt;invalid&gt;                       kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;de4d7669206f568618a79098d564e76899779f94120bddcee080c75f81243a85&quot; network for pod &quot;wordpress-mysql-74578f5d6d-65jvt&quot;: networkPlugin cni failed to set up pod &quot;wordpress-mysql-74578f5d6d-65jvt_produccion&quot; network: invalid character 'i' looking for beginning of value

</code></pre>
<p>I was using some guides from Internet like this one: <a href="https://www.projectcalico.org/calico-ipam-explained-and-enhanced/" rel="nofollow noreferrer">https://www.projectcalico.org/calico-ipam-explained-and-enhanced/</a>
but even this doesn't work on my lab.</p>
<p>I am pretty new using Kubernetes and I don't know what else to do or check.</p>

MaryStadhes
<p>Your error is due to invalid values in the YAML, according to the Project Calico documentation here: <a href="https://docs.projectcalico.org/archive/v3.19/reference/cni-plugin/configuration#specifying-ip-pools-on-a-per-namespace-or-per-pod-basis" rel="nofollow noreferrer">Using Kubernetes annotations</a></p>
<p>You will need to provide a list of IP pools as the value in your annotation instead of a single string. The following snippet should work for you.</p>
<pre><code>cni.projectcalico.org/ipv4pools: &quot;[\&quot;ippool\&quot;]&quot;
</code></pre>
