How to create/delete pods from another pod or Kubernetes entity











up vote
1
down vote

favorite












I am a newbie to Kubernetes and have a design question for you.



There are 3 main things I am using:




  1. Producer - the binary will be same but the sources from where the producer will be getting data are different. User can create any number of producers from different sources. They can be added or deleted at runtime.


  2. Tasks - there are one or many tasks for one producer - they can be added or reduced at runtime. Every task runs some particular, unique query (defined by user).


  3. A business logic entity - which will create new producers or new tasks OR delete producer(s) or task(s) depending on the user request.



Now, Currently I am achieving this by running business logic in a pod and it runtime creates producer pod(s) & task pod(s) by using “Kubernetes python client APIs”.



I would like to know is there any better way to do that?



I am definitely not looking for replicaSet or Horizontal Pod accelerator as the arguments to my producer/task pods will always change - depending from user data.



I am also okay with converting the business logic into any other Kubernetes entity which can runtime create/delete pods?



Any help would be appreciated.



Thank you.










share|improve this question




























    up vote
    1
    down vote

    favorite












    I am a newbie to Kubernetes and have a design question for you.



    There are 3 main things I am using:




    1. Producer - the binary will be same but the sources from where the producer will be getting data are different. User can create any number of producers from different sources. They can be added or deleted at runtime.


    2. Tasks - there are one or many tasks for one producer - they can be added or reduced at runtime. Every task runs some particular, unique query (defined by user).


    3. A business logic entity - which will create new producers or new tasks OR delete producer(s) or task(s) depending on the user request.



    Now, Currently I am achieving this by running business logic in a pod and it runtime creates producer pod(s) & task pod(s) by using “Kubernetes python client APIs”.



    I would like to know is there any better way to do that?



    I am definitely not looking for replicaSet or Horizontal Pod accelerator as the arguments to my producer/task pods will always change - depending from user data.



    I am also okay with converting the business logic into any other Kubernetes entity which can runtime create/delete pods?



    Any help would be appreciated.



    Thank you.










    share|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am a newbie to Kubernetes and have a design question for you.



      There are 3 main things I am using:




      1. Producer - the binary will be same but the sources from where the producer will be getting data are different. User can create any number of producers from different sources. They can be added or deleted at runtime.


      2. Tasks - there are one or many tasks for one producer - they can be added or reduced at runtime. Every task runs some particular, unique query (defined by user).


      3. A business logic entity - which will create new producers or new tasks OR delete producer(s) or task(s) depending on the user request.



      Now, Currently I am achieving this by running business logic in a pod and it runtime creates producer pod(s) & task pod(s) by using “Kubernetes python client APIs”.



      I would like to know is there any better way to do that?



      I am definitely not looking for replicaSet or Horizontal Pod accelerator as the arguments to my producer/task pods will always change - depending from user data.



      I am also okay with converting the business logic into any other Kubernetes entity which can runtime create/delete pods?



      Any help would be appreciated.



      Thank you.










      share|improve this question















      I am a newbie to Kubernetes and have a design question for you.



      There are 3 main things I am using:




      1. Producer - the binary will be same but the sources from where the producer will be getting data are different. User can create any number of producers from different sources. They can be added or deleted at runtime.


      2. Tasks - there are one or many tasks for one producer - they can be added or reduced at runtime. Every task runs some particular, unique query (defined by user).


      3. A business logic entity - which will create new producers or new tasks OR delete producer(s) or task(s) depending on the user request.



      Now, Currently I am achieving this by running business logic in a pod and it runtime creates producer pod(s) & task pod(s) by using “Kubernetes python client APIs”.



      I would like to know is there any better way to do that?



      I am definitely not looking for replicaSet or Horizontal Pod accelerator as the arguments to my producer/task pods will always change - depending from user data.



      I am also okay with converting the business logic into any other Kubernetes entity which can runtime create/delete pods?



      Any help would be appreciated.



      Thank you.







      python kubernetes cluster-computing






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 19 at 5:46









      Emruz Hossain

      90329




      90329










      asked Nov 19 at 1:07









      neo3matrix

      568




      568





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53367095%2fhow-to-create-delete-pods-from-another-pod-or-kubernetes-entity%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53367095%2fhow-to-create-delete-pods-from-another-pod-or-kubernetes-entity%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Create new schema in PostgreSQL using DBeaver

          Deepest pit of an array with Javascript: test on Codility

          Costa Masnaga