'Change platform for kubernetes when pulling image

I am using an Apple M1, writing a Kubernetes YAML file to pull and deploy the image confluentinc/cp-zookeeper:6.2.4 the problem is, I cannot pull the image due to the difference in CPU architecture

Failed to pull image "confluentinc/cp-zookeeper:6.2.4": rpc error: code = Unknown desc = no matching manifest for linux/arm64/v8 in the manifest list entries

When using docker-compose, I can just specify the tag platform: linux/x86_64 and everything goes as normal, but I'm not sure how to do this for K8S, I have tried to set the environment variable DOCKER_DEFAULT_PLATFORM as well but it's not working either.

I'm using Docker-Desktop's built in Kubernetes



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source