Can Kubernetes be used like Docker Compose?

I have been digging through the Kubernetes documentation for hours. I understand the core design, and the notion of services, controllers, pods, etc.

What I don’t understand, however, is the process in which I can declaratively configure the cluster. That is, a way for me to write a config file (or a set thereof) to define the makeup, and scaling options of the cloud deployment. I want to be able to declare which containers I want in which pods, how they will communicate, how they will scale, etc. without running a ton of cli commands.

  • Linking Multiple Docker Swarms
  • Docker Postgress Clear all Data
  • Docker nancy - no route to host
  • Swarm Cluster Consul setup
  • Assign public IP to docker
  • `container:init` is not a heroku command
  • Is there docker-compose functionality for Kubernetes?

    I want my application to be defined in git—to be version controlled–without relying on manual cli interactions.

    Is this possible to do in a concise way? Is there a reference that is more clear than the official documentation?

  • Beneifts of line continuation in Dockerfiles
  • Docker exec - Write text to file in container
  • how to set up a fast and light development environment using docker?
  • Docker ElasticSearch 5 does not start . Even ELK does not start
  • Should we initialize Docker daemon every time when we restart the blockchain server?
  • How to send configurations to docker container? [closed]
  • 3 Solutions collect form web for “Can Kubernetes be used like Docker Compose?”

    If you still looking, maybe this can help

    using this tool

    You can create compose file

      image: nginx
        - "80"
        - "443"
      image: postgres
        - "5432"
      image: memcached
        - "11211"

    Then use the tool to convert it to kubernetes objetcs

    compose2kube -compose-file docker-compose.yml -output-dir output

    Which will create those files


    then you can use kubectl to apply them to kubernetes

    Kubernetes certainly has its own yaml (as shown in “Deploying Applications”)

    But as “Docker Clustering Tools Compared: Kubernetes vs Docker Swarm”, it was not written (just) for Docker, and it has its own system.

    You could use docker-compose to start Kubernetes though, as shown in “vyshane/kid“: that does mask some of the kubectl commands cli in scripts (which can be versioned).

    If you have existing docker composer files, you may take a look at the Kompose project

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.