I am going to run my golang app on oracle linux 7 server, I am going to use kubernetes using docker containers. What kind of kubernetes cluster can I use? Can you introduce me some short tutorial for deploying my app. Thank you!
For short introduction I think this blog post is really good. It will tell you basics and what you should know at start https://www.digitalocean.com/community/tutorials/an-introduction-to-kubernetes
But if you want to get deeper, start reading:
https://kubernetes.io/
For a start, use minkube, which allow you to run kubernetes locally https://github.com/kubernetes/minikube
Related
I wrote a simple Java Web application based on Spring with H2 database. Now I want to containerise it.
I was thinking about using docker. Is that a good choice. Would there be some other tool ?
Honestly I do not know advantages of docker. I mean Java is platform independent anyway. So what makes it appealling of using Docker ?
What I also understand if you have many many containers you need a tool like Kubernetes to manage all these containers.
Thanks for your help.
I recommend reading Docker Get Started, this will answer all your questions.
If you need a quick example of a dockerized Spring application you can check this one or read Spring Boot with Docker guide.
I'm learning to work with docker/docker-compose, and having a few issues now.
I can't really understand how it works, for example, if i run php7.2 image - what operating system is it running on ?
Currently i'm thinking about working on my new project with docker, but can't find a way to create docker configs.
What i want now is: Use base image/service with operating system - ubuntu, then i need extend that image/service and add services like java, mysql, also need to checkout 2 repositories which should be later run on that ubuntu service with java and mysql. How can i do that ? I've tried googling for some examples, but i'm not been able to find any good example.
I would really appreciate any help with that. Thanks in advance
As start example you can read http://geekyplatypus.com/dockerise-your-php-application-with-nginx-and-php7-fpm/
You don't need to extend your image with other services because the paradigm here is "one container = one service". Here best practices.
When trying to move a web container (Tomcat) to the latest technologies for better growth and support, I came across this blog. This part seems ideal for my needs:
... we are also incorporating Kubernetes into Mesos to manage the deployment of Docker workloads. Together, we provide customers with a commercial-grade, highly-available and production-ready compute fabric.
Now, how to setup a local test environment to try this out? All these technologies seem interchangable! I can run docker on mesos, mesos on docker, etc etc etc. Prepackaged instances allow me to run on others Clouds. Other videos also make this seem great! Running out on the cloud is not a viable (allowed) option for me. Unfortunately, I can not find 'instructions' on how to setup the configuration described/marketed/advertised.
If I am new to these technologies, and know there will be a learning curve, is there a way to get initialized for doing such a "simple task": running a tomcat container on a Docker machine that is running Mesos/Kubernetes? That is, without spending days trying to learn and figure out each individual part! This is the picture from the blog site referenced:
Assuming that I "only" know how to create a docker container(s) (for say, centos-7). What commands, in what order, (i.e. the secret 'code') do I need to use to configure small (2 or 3) local environment to try out running Tomcat?
Although I searched quite a bit, apparently not enough! Someone pointed me to this:
https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/mesos-docker.md
which is pretty close to exactly what I was looking for.
New question:
I've followed the guestbook tutorial here: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/examples/guestbook/README.md
And the output of my commands match their outputs exactly. When I try to access the guestbook web server, the page does not load.
Specifically, I have the frontend on port 80, I have enabled http/s connections on the console for all instances, I have run the command:
gcloud compute firewall-rules create --allow=tcp:<PortNumberHere> --target-tags=TagNameHere TagNameHere-<PortNumberHere>
and also
cluster/kubectl.sh get services guestbook -o template --template='{{(index .status.loadBalancer.ingress 0).ip}}'
But when I run curl -v http://:, the connection simply times out.
What am I missing?
Old Question - Ignore:
Edit: Specifically, I have 3 separate docker images. How can I tell kubernetes to run these three images?
I have 3 docker images, each of which use each other to perform their tasks. One is influxdb, the other is a web app, and the third is an engine that does data processing.
I have managed to get them working locally on my machine with docker-compose, and now I want to deploy them on googles compute engine so that I can access it over the web. I also want to be able to scale the software. I am completely, 100% new to cloud computing, and have never used gce before.
I have looked at Kubernetes, and followed the docs, but I cannot get it to work on a gce instance. What am I missing/not understanding? I have searched and read all the docs I could find, but I still don't feel any closer to getting it than before.
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/gce.md
To get best results on SO you need to ask specific questions.
But, to answer a general question with a general answer, Google's Cloud Platform Kubernetes wrapper is Container Engine. I suggest you run through the Container Engine tutorials, paying careful attention to the configuration files, before you attempt to implement your own solution.
See the guestbook to get started: https://cloud.google.com/container-engine/docs/tutorials/guestbook
To echo what rdc said, you should definitely go through the tutorial, which will help you understand the system better. But the short answer to your question is that you want to create a ReplicationController and specify the containers' information in the pod template.
i have tried to learn some case like following:
https://github.com/ubermuda/docker-symfony
https://github.com/stage1/docker-php
but that above is not great for me. I need some post to tell me the complete process how to use docker with development.I have not problem with docker command such as docker-compose. Who have used docker as development environment? Give me some advice ,please.
thanks in advance.
What you are asking is MUCH too broad for it to be answerable in one reply.
I would start at the official Docker website, evaluate which images you might need (you can always build them yourself as well), and start putting your development environment together.
Docker