FATA Version of Docker Compose is not supported. Please use version 1, 2 or 3 – Kubernetes Error – How to fix?
In this small post, you will learn how to fix the Kubernetes error FATA Version of Docker Compose is not supported. Please use version 1, 2 or 3. This error occurs when you use Kompose to convert a Docker Compose file to Kubernetes object.
kompose is an excellent tool that helps you convert your Docker Compose configuration to Kubernetes configurations. When you try doing this for the first time you might get the following error.
[anand@dev DockerCompose]$ kompose convert -f docker-compose.yml FATA Version 3.4 of Docker Compose is not supported. Please use version 1, 2 or 3
The error suggests kompose doesn’t support any versions other than 1, 2 or 3, not even 1.3, 2.4 or 3.7!
To fix this, you just change your version in the docker.compose.yml file to 3.
version: "3" services: mongodb: container_name: "container_mongo_backend" image: mongo volumes: - /db_data/:/db_data/ expose: - "27017"
[anand@dev DockerCompose]$ kompose convert -f docker-compose.yml WARN Volume mount on the host "/db-data/" isn't supported - ignoring path on the host INFO Kubernetes file "mongodb-service.yaml" created INFO Kubernetes file "mongodb-deployment.yaml" created INFO Kubernetes file "mongodb-claim0-persistentvolumeclaim.yaml" created