Skip to content

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 

Voila!

See also  Unable to connect to the server: x509: certificate signed by unknown authority - kubectl error when connecting to gcloud pods. How to fix?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.