Articles → DOCKER → Create A Pod With Multiple Images In Kubernetes
Create A Pod With Multiple Images In Kubernetes
Prerequisite
- Kind tool
- Create a multinode cluster
- Install Kubectl using the following command: -
snap install kubectl --classic
- Install Kubeadm
- Create the control-plane node using the kubeadm init command
- Create the worker node(s) using the kubeadm join command
Create A Pod With Multiple Images
apiVersion: v1
kind: Pod
metadata:
name: python-redis-pod
spec:
containers:
- name: python-container
image: python:3.9
command: ["python", "-c"]
args:
- |
import time
while True:
print("Python Application is running")
time.sleep(5)
- name: redis-container
image: redis:latest
ports:
- containerPort: 6379
kubectl apply -f python-redis-pod.yaml