kompose | Convert Compose to Kubernetes | Continuous Deployment library
kandi X-RAY | kompose Summary
kandi X-RAY | kompose Summary
kompose is a tool to help users who are familiar with docker-compose move to Kubernetes. kompose takes a Docker Compose file and translates it into Kubernetes resources. kompose is a convenience tool to go from local Docker development to managing your application with Kubernetes. Transformation of the Docker Compose format to Kubernetes resources manifest may not be exact, but it helps tremendously when first deploying an application on Kubernetes.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of kompose
kompose Key Features
kompose Examples and Code Snippets
Community Discussions
Trending Discussions on kompose
QUESTION
I am trying to connect a folder in windows to a container folder. This is for a .NET app that needs to read files in a folder. In a normal docker container, with docker-compose, the app works without problems, but since this is only one of several different apps that we will have to monitor, we are trying to get kubernetes involved. That is also where we are failing. As a beginner with kubernetes, I used kompose.exe to convert the compose files to kuberetes style. However, no matter if I use hostPath or persistentVolumeClaim as a flag, I do not get things to work "out of the box". With hostPath, the path is very incorrect, and with persistentVolumeClaim I get a warning saying volume mount on the host is not supported. I, therefore, tried to do that part myself but can get it to work with neither persistent volume nor entering mount data in the deployment file directly. The closest I have come is that I can enter the folder, and I can change to subfolders within, but as soon as I try to run any other command, be it 'ls' or 'cat', I get "Operation not permitted". Here is my docker compose file, which works as expected by
...ANSWER
Answered 2022-Feb-08 at 05:19Thanks to RadekW, the problem is now solved. The path should be written as /run/desktop/mnt/host/c/PATH/TO/FILE
, and in my case: /run/desktop/mnt/host/c/temp/testfiles
. If I find any documentation about this, I will add a source.
QUESTION
I'm try to get my local development environment converted from docker-compose
to a flavour of lightweight Kubernetes, since our production environments are all Kubernetes (like). With the help of Kompose I could convert my settings. The part however I struggle with is the conversion of Docker volumes to a local developer machine Volume and Volume claim. Most examples I found cover drivers for S3 or NFS, which isn't what my development laptop offers.
So when I have in my docker-compose.yml
a setting like this, what's the local development equivalent in k8s?
ANSWER
Answered 2022-Feb-03 at 20:12Yes you can use the host path or you can use the emptydir that's on you
Probably hostpath would be a better option.
If you are planning to use the minikube you can also check out the PV and PVC option which is mostly for the persistence storage in Kubernetes.
Hostpath : https://kubernetes.io/docs/concepts/storage/volumes/#hostpath-configuration-example
emptydir : https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
QUESTION
I'm trying to switch an existing app from docker-compose to Kubernetes (first time using it). My app is deployed on AWS EKS using Fargate nodes. It runs well, but I would like to access the RabbitMQ management UI for debugging purposes.
The rabbit deployment/services files I am using are the following:
...ANSWER
Answered 2022-Feb-01 at 10:45Posting the answer out of comments.
First what kubectl proxy
is:
Creates a proxy server or application-level gateway between localhost and the Kubernetes API server. It also allows serving static content over specified HTTP path. All incoming data enters through one port and gets forwarded to the remote Kubernetes API server port, except for the path matching the static content path.
Also kubectl proxy
works with HTTP requests, it does not work with TCP traffic. (this is probably the reason why it did not work).
You can read more in a good answer - kubectl proxy vs kubectl port-forward
Common options to access the service inside the cluster are:
use
kubectl port-forward
- for local development and testing purposesuse
loadbalancer
ornodeport
service type - more advanced options which can be used across clusters and production environments. Find more about service types.
QUESTION
I am trying to run Oracle 12c on Kubernetes.
When I start it as docker container the FIRST TIME I have to wait until it configures.
It configures successfully and pass scripts in my configDBora.sh
that I'd added.
BUT If I want to login as user that I created I couldn't do that. I have to restart the container at LEAST ONCE.
How can I do that in Kubernetes? There is no stop command. I also tried changing replicas to 0 of my deployment but it deletes existing pod.
What script can I add to configDBora.sh
or do something else to restart a container with oracle on kubernetes?
The end of the script in configDBora.sh
is:
ANSWER
Answered 2022-Jan-26 at 16:19In this case, you can try to restart your deployment:
QUESTION
I have project written in Django Restframework, Celery for executing long running task, Redis as a broker and Flower for monitoring Celery task. I have written a Dockerfile
& docker-compose.yaml
to create a network and run this services inside containers.
Dockerfile
...ANSWER
Answered 2022-Jan-24 at 11:14After kompose convert
your flower-service.yaml file have duplicate ports - that's what the error is saying.
QUESTION
I use Kompose to convert docker-compose to Kubernetes files. When I used images runned on Docker (no Kubernetes), it used postgres volume to have persistent data. Now, with the same docker-compose, if I run with Kubernetes using the file created with Kompose, every time I launch Kubernetes the database is empty. How is this possible? If I look at Docker Desktop, in fact, I see that the volumes do not have the tag "IN USE".
How do I do that?
Thank you in advance!
docker-compose.yaml:
...ANSWER
Answered 2022-Jan-08 at 13:07In a comment you write:
When I want to delete all, I run this command:
QUESTION
Tryin to run RabbitMQ on a local k8s cluster but it keeps restarting till will CrashLoopBackOff
with an error:
ANSWER
Answered 2022-Jan-06 at 14:49It came up that image contains rabbitmq-diagnostics
but when you will specify command as a single string like that, it's looking for a binary in the path that's literally the full string, including spaces, rabbitmq-diagnostics -q ping
, so it should be something like this instead:
QUESTION
I've dockerize a nestcloud app with consul and a bunch of microservices. However, i'm unable to start any of the microservice (for example test-service below, as it seems consul is refusing any tcp connection :
...ANSWER
Answered 2021-Dec-05 at 18:06You trying to access consul with localhost from NestJs service, this is another container, it's localhost is different from consul localhost, you need to access consule with the container name as the host
Change consul host to ${{ CONSUL_HOST }}
in bootstrap-development.yaml
.
CONSUL_HOST
is defined in docker-compose.yaml
: CONSUL_HOST=consul
new bootstrap-development.yaml
:
QUESTION
I try to deploy the web-app akaunting to a k8s cluster.
Therefore, I converted the given (and working!) docker-compose script using kompose to k8s yaml files.
When I try to apply these files (given AKAUNTING_SETUP=true
), I get the following error; I have no clue how to fix it...
ANSWER
Answered 2021-Nov-26 at 12:19Hi - I found the root cause of the problem - and answered the question yesterday night - but my post was deleted - not sure why (possibly since I hadn't finished registration???)
Turns out that the root of the problem is because the default Dockerfile image does NOT have the modules included. These modules seem to be downloaded after the first successful login (which interestingly requires the setup to finish - catch-22)!!!
Fix:
- Download the following 3 modules from their Github - offline-payments, paypal-standard and bc21.
- Extract the contents of these to 3 folders to the akaunting-modules volume - folder names need to be OfflinePayments, PaypalStandard and BC21 (guessing case sensitive).
- Restart the containers.
Let me know if that helps. I've got to the Wizard steps by doing the above. After you pass the Wizard steps remember to restart with AKAUNTING_SETUP=false (checks for existing records don't seem to be great) R. Saravanan
QUESTION
I have a small web application (a Rails app called sofia
) that I'm deploying locally with minikube
.
When I create the k8s resources and run my deployment, the containers do not contain any of the files that were supposed to be copied over during the image build process.
Here's what I'm doing:
DockerfileAs part of the Dockerfile
build, I copy the contents of my local cloned repository into the image working directory:
ANSWER
Answered 2021-Nov-23 at 21:08The issue is that Volumes are not behaving the same way in Docker in docker-compose and K8s. Kompose can't perfectly translate volume. In Docker with docker-compose, your declared volume keep the existing files from the directory, while in k8s, a volume is created empty and shadow the existing content.
There is no direct equivalent of docker-compose volumes that keeps existing files in k8s, you will have to work around that with one of the following options, depending on what makes sense in your use case:
- leverage ConfigMaps to add your files to this app volume (if needed, use subPath). Probably ok for a handfull of config files if that's what lives your app directory when the container starts
- in your dockerfile, use COPY to something like app-tmp, then in your entrypoint script copy those files from that app-tmp directory to your "app" volume
- Refactor your application so that it uses "app1" directory (without volumes) with existing files, "app2" starts empty and is used as your volume.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install kompose
Binary (Preferred method)
Go
CentOS
Fedora
openSUSE/SLE
Ubuntu/Debian
NixOS
macOS (Homebrew and MacPorts)
Windows
Docker
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page