Looking for service pool managing solution

15 views
Skip to first unread message

tomasz....@gmail.com

unread,
May 17, 2018, 5:20:29 AM5/17/18
to Kubernetes user discussion and Q&A
Greetings,
I am looking for a software to manage a pool of application, using API and database system. Let me show You my problem:
I have 3 types of services: A, B and C. Each one requires outside resource, so we distinguish each instance. e.g.: I have 6 A-type virtual machines { A1, A2,.., A6}, 3 B-type: {B1,B2,B3} and 10 C-type. Each instance has its own internal setup, mostly IPs to remote resources. Now I want my managing system to solve usecases:
1. One of Jenkinses (I could have few) needs to test something using A-type instance. He sends API request and gets details to about random from that type and uses it. When he is done, the instance isfreed and returned using API.
2. A software developers needs some manual tests and asks for C-type instance. He sends an API request and gets details on one of those instances.
3. Only one "user" (Jenkins or human) can be using given instance at any time.
4. I need to be able to check who/what is using any of the instances at any time (can also be API query).
5. There needs to be security logs - when who requested what, what he got in
return.


I am looking for a system to solve this problem, one of my Colleagues hinted me to use Kubernetes - since the "instance" can be containers with uniqe configuration it might be possible, but could anyone comment: does Kubernetes satisfies all my needs? Or maybe something else?

Rodrigo Campos

unread,
May 17, 2018, 8:53:05 AM5/17/18
to kubernet...@googlegroups.com
For what I understand, yes. Go ahead and try it out and read the docs.

Each container/pod can specify it's requirements regarding could/mem, and k8s will allocate them while they exist automatically on some node. Or you can even make sure some containers/pods will be run on some type of nodes (like the ones with SSD, etc.)

So, yes, it should. Have fun! :-)
--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
To post to this group, send email to kubernet...@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

tomasz....@gmail.com

unread,
May 17, 2018, 11:35:04 AM5/17/18
to Kubernetes user discussion and Q&A
Hi Rodrigo,
I cannot find an example for one thing:
Let's say I have 3 pods defined:
type: A, unique_variable: 111
type: A, unique_variable: 222
type: A, unique_variable: 333

Now: how can I use API or Kubectl to create random pod of type A?


Kind regards,
Tomasz

Rodrigo Campos

unread,
May 17, 2018, 12:00:06 PM5/17/18
to kubernet...@googlegroups.com
Can you please elaborate? I don't follow what you mean with "type A,
unique variable: xxx".

tomasz....@gmail.com

unread,
May 17, 2018, 3:29:08 PM5/17/18
to Kubernetes user discussion and Q&A
So:
I have 3 types of devices. Each device has assigned container - to access device you have to connect to container and from there you can use device.
Containers have special environment variable describing to which device it is assigned, e.g. B4 - which means: device type B, number 4.

Now we are lending access to device by manually passing access to chosen container, but my need is to automate it: developer sends request: I need device type A. System checks if there is any resource available and gives access to developer. When developer is done, he sends request: ok, I'm done. Ramp down the container. And next user can request for it.

Rodrigo Campos

unread,
May 17, 2018, 3:33:38 PM5/17/18
to kubernet...@googlegroups.com
On Thursday, May 17, 2018, <tomasz....@gmail.com> wrote:
So:
I have 3 types of devices. Each device has assigned container - to access device you have to connect to container and from there you can use device.

What do you mean with device?
 
Containers have special environment variable describing to which device it is assigned, e.g. B4 - which means: device type B, number 4.

Now we are lending access to device by manually passing access to chosen container, but my need is to automate it: developer sends request: I need device type A. System checks if there is any resource available and gives access to developer. When developer is done, he sends request: ok, I'm done. Ramp down the container. And next user can request for it.

You can easily create pods based on a yaml. And use the Kubernetes API or kubectl to create them or delete.

IIUC, that is what you need, right?

tomasz....@gmail.com

unread,
May 17, 2018, 3:46:18 PM5/17/18
to Kubernetes user discussion and Q&A
Let's simplify it:
can I write 5 different pod yamls, put in it a kind of "tag" and write an API request (request should have "tag" value) that will run ONE random pod from those 5?

Rodrigo Campos

unread,
May 17, 2018, 7:33:15 PM5/17/18
to kubernet...@googlegroups.com
Not sure it's simpler, nor what you mean with tags.

But yeah, you can create pods via the API, count, or use quota limits if you prefer, too.

Let's simplify it: try and report back ;)

Seriously, I think that would be the easiest and fastest thing to do.


On Thursday, May 17, 2018, <tomasz....@gmail.com> wrote:
Let's simplify it:
can I write 5 different pod yamls, put in it a kind of "tag" and write an API request (request should have "tag" value) that will run ONE random pod from those 5?

Reply all
Reply to author
Forward
0 new messages