> For the complete documentation index, see [llms.txt](https://nishanthkp.gitbook.io/kubernetes-security-with-calico-and-istio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nishanthkp.gitbook.io/kubernetes-security-with-calico-and-istio/understand-k8s/pod-connectivity.md).

# Pod Connectivity

### Create a namespace <a href="#create-a-namespace" id="create-a-namespace"></a>

Create a namespace so that the resources you create in this exercise are isolated from the rest of your cluster.

```shell
kubectl create namespace mem-example
```

### Specify a memory request and a memory limit[ ](https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/#specify-a-memory-request-and-a-memory-limit) <a href="#specify-a-memory-request-and-a-memory-limit" id="specify-a-memory-request-and-a-memory-limit"></a>

To specify a memory request for a Container, include the `resources:requests` field in the Container's resource manifest. To specify a memory limit, include `resources:limits`.

In this exercise, you create a Pod that has one Container. The Container has a memory request of 100 MiB and a memory limit of 200 MiB. Here's the configuration file for the Pod:

Create the Pod:

```shell
kubectl apply -f https://k8s.io/examples/pods/resource/memory-request-limit.yaml --namespace=mem-example
```

Verify that the Pod Container is running:

```shell
kubectl get pod memory-demo --namespace=mem-example
```

View detailed information about the Pod:

```shell
kubectl get pod memory-demo --output=yaml --namespace=mem-example
```

Run `kubectl top` to fetch the metrics for the pod:

```shell
kubectl top pod memory-demo --namespace=mem-example
```

Delete your Pod:

```shell
kubectl delete pod memory-demo --namespace=mem-example
```
