Fabric8 in Production Enviornment

136 views
Skip to first unread message

ankit bansal

unread,
May 8, 2017, 4:45:53 AM5/8/17
to fabric8
I am trying to use Fabric8.

What I want to know is that Fabric8 uses Minikube to maintain Kubernetes Cluster(by maintain, I mean it runs Kubernetes Cluster inside the VM).
But I want to use Fabric8 for production environment meaning I will be running One micro-service inside docker container & then needs to run that service with the help of fabric8 with two / three different servers (as replicas). How do I maintain such architecture  using Fabric8?

James Strachan

unread,
May 8, 2017, 5:03:09 AM5/8/17
to ankit bansal, fabric8
On Mon, May 8, 2017 at 9:45 AM, ankit bansal <ankit.ba...@gmail.com> wrote:
I am trying to use Fabric8.

What I want to know is that Fabric8 uses Minikube to maintain Kubernetes Cluster(by maintain, I mean it runs Kubernetes Cluster inside the VM).

fabric8 is designed to run on any kubernetes or openshift cluster(s). Its up to you where to install it.

 
But I want to use Fabric8 for production environment meaning I will be running One micro-service inside docker container & then needs to run that service with the help of fabric8 with two / three different servers (as replicas). How do I maintain such architecture  using Fabric8?

For production stuff I'd start with a real cluster of kubernetes/openshift and then install fabric8 onto it. There are many choices for kubernetes/openshift cluster now depending on if you have your own hardware and whether or not you want to install, manage and maintain the cluster yourself. If not try openshift online or GKE?

--
James
-------
Red Hat

Twitter: @jstrachan
Email: james.s...@gmail.com
Blog: https://medium.com/@jstrachan/

open source development platform

open source event based lambda programming

ankit bansal

unread,
May 8, 2017, 6:23:31 AM5/8/17
to fabric8
Hi James. Thanks for replying.

So lets say I have installed kubernetes on 5 machines which I want to be part of my cluster.

Now what I want is the central management point via which I can access the complete cluster. So do I have to install fabric 8 on all machines?
Also how do I add / feed my cluster informations(specifially machines information Ip & port) to fabric8.

James Strachan

unread,
May 8, 2017, 6:31:46 AM5/8/17
to ankit bansal, fabric8
On Mon, May 8, 2017 at 11:23 AM, ankit bansal <ankit.ba...@gmail.com> wrote:
Hi James. Thanks for replying.

So lets say I have installed kubernetes on 5 machines which I want to be part of my cluster.

Now what I want is the central management point via which I can access the complete cluster. So do I have to install fabric 8 on all machines?
Also how do I add / feed my cluster informations(specifially machines information Ip & port) to fabric8.

So you'd wanna install centralised logging and monitoring to monitor your nodes, containers and cluster services. (e.g. Elasticsearch/fluentd for logging and prometheus for metrics). Those are available in the 'management' app in the fabric8 console.

Though this assumes something/someone is installing/managing the kubernetes cluster too. e.g. using your Ops team to keep your on premise cluster working; or using OpenShift Online / OpenShift Dedicated to let you delegate that to Red Hat or using GKE to delegate that to Google.

You can also use kubernetes to self host kubernetes (so you can do rolling ugprades of node software using kubenretes)

though you still need a way to bring on nodes to the cluster if nodes fail or you get low on hardware; whereas the cloud is kinda awesome at that side of things

Christer Berglund

unread,
May 8, 2017, 9:47:52 AM5/8/17
to fabric8
If you have a kubernetes cluster up and running there should one node that is the master node. This is where you point your kubectl configuration to.
Then by using gofabric8 deploy fabric8 is installed on to the kubernetes cluster and you don't have to worry about which part of fabric8 is installed on which server, that is all up to kubernetes, that is the beauty of kubernetes.

To answer your questions:
No you only install fabric8 once using gofabric8.
You do not feed cluster information to fabric8 since gofabric8 will use kubectl.

Cheers,
Christer

ankit bansal

unread,
May 8, 2017, 11:44:21 PM5/8/17
to fabric8

Thanks Christer for replying. So that means lets say there are 5 machines

A , B , C , D , E

and A is master of Kubernetes Cluster and Rest B , C, D, E are workers.
Then at A , i have to specify information(IP Address) about workers of B, C, D ,E
and then I just need to install fabric8 at A(which is master)

Am I Correct?

Also I have tested fabric8 on local machine then it uses minikube to run cluster but in this case we donot need this.
Then how do i tell fabric8 to use my kubernetes cluster and not the minikube one?

Christer Berglund

unread,
May 9, 2017, 2:35:53 AM5/9/17
to fabric8
The installation and setup of kubernetes cluster is one thing. I have only installed on ubuntu 14.04 and 16.04. To install kubernetes on ubuntu 16.04 I am now using a tool from kubernetes called kubeadm. When using kubeadm I start to install kubernetes on the master. This will give me a token which later is usen when installing the other nodes. This way the cluster is built up and you can add more nodes as needed using this token. I guess installation on other OS's are about the same.

To administrate the kubernetes cluster you use the tool kubectl. This tool is a client to the kubernetes cluster so this tool is used from client machines, not from the machines A, B, C, D  and E in your example. Kubectl could be used from your local machine. However kubectl must have be configured correctly to be able to connect to the cluster.

This means that you can run gofabric8 locally from your machine. Not from A, B, C, D or E. You just need to make sure that there is a kubectl which is configured to connect to your cluster. If you want to, you can have another cluster consisting of servers F, G, H and I and you can have the same kubectl tool connecting to both cluster (one at a time).
gofabric8 will install fabric8 as pods using all functionality of kubernetes (services, deployments, namespaces, pods, replica sets...)

I hope this gives some clarity.

/Christer

James Strachan

unread,
May 9, 2017, 3:30:10 AM5/9/17
to Christer Berglund, fabric8
Great answer Christer thanks!

Just to add to that - the command line tools kubectl (for kubernetes & openshift) and oc (for openshift specific CLI tools) along with gofabric8 all work in the same way; they use the ~/.kube/config file to know which cluster to communicate with. So you can easily point at any cluster then kubectl / oc / gofabric8 will all talk to the same cluster.

--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages