Hi,
Hello. I'm starting to learn kubernetes and I came up with a task for myself: to deploy a pod with a standard container from a Docker. The test cluster and the test namespace. Was my plan correct ? :
1) install Docker
2) Download nginx image (docker pull nginx)
3) Create file pod-nginx.yaml
---
apiVersion: v1
kind: Pod
metadata:
name: test-nginx-pod
namespace: dummy
labels:
name: test-nginx-pod
spec:
containers:
- name: nginx
image: nginx:latest
resources:
limits:
memory: "512m"
cpu: "4"
requests:
memory: "256m"
cpu: "2"
ports:
- containerPort: 65342
4) kubectl create -f pod-nginx.yaml
If you do so, the pod will have the status of containercreating.
Does this mean that the pod has been created, but there are no containers in it ?
I do not understand how k8s will understand where to look for an nginx image ?
Hello. I'm starting to learn kubernetes and I came up with a task for myself: to deploy a pod with a standard container from a Docker. The test cluster and the test namespace. Was my plan correct ? :
1) install Docker
2) Download nginx image (docker pull nginx)
3) Create file pod-nginx.yaml
---
apiVersion: v1
kind: Pod
metadata:
name: test-nginx-pod
namespace: dummy
labels:
name: test-nginx-pod
spec:
containers:
- name: nginx
image: nginx:latest
resources:
limits:
memory: "512m"
cpu: "4"
requests:
memory: "256m"
cpu: "2"
ports:
- containerPort: 65342
4) kubectl create -f pod-nginx.yaml
If you do so, the pod will have the status of containercreating.
Does this mean that the pod has been created, but there are no containers in it ?
I do not understand how k8s will understand where to look for an nginx image ?