Containerization Software Engineering

Container keep getting crashed – K8S

I was facing a strange issue while deploying k8s image

Recognized this is something to do with the images

I tried deploying couple of micro services and built an image in Macbook pro M1 chip 

something rang a bell.. is this due to the platform arch difference? please refer this screenshot that the client and server amd64 vs arm64 has it..

Yes the issue is due to the arch difference only. Now how do you change it?

One way is, you can provision arm64 continainers in gcloud and continue to build the image in arm64 if not change move it to amd64.

if you want to build amd64 docker images in mac os apple chip then docker buildx comes for rescue

To install buildx

brew install docker buildx

build your image in arm64 and then run the buildx command below to change the architecture and push it to docker hub

docker buildx build –platform linux/amd64,linux/arm64 -t <respositoryname>/hello-world-rest-api:latest –push .

Author

KR Kaleraj