Running docker inside Kubernetes with containerd











up vote
1
down vote

favorite












Since K8S v1.11 Runtime was changed from dockerd to containerd.
I'm using Jenkins over kubernetes to build docker images using Docker outside of Docker (dood).



When I tried to switch to use the socket file from conatinerd (containerd/containerd.sock was mapped ad /var/run/docker.sock) with the regular docker client a got the following error Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/json: net/http: HTTP/1.x transport connection broken: malformed HTTP response "x00x00x00x04x00x00x00x00x00".



Can docker client be used with containerd?










share|improve this question


























    up vote
    1
    down vote

    favorite












    Since K8S v1.11 Runtime was changed from dockerd to containerd.
    I'm using Jenkins over kubernetes to build docker images using Docker outside of Docker (dood).



    When I tried to switch to use the socket file from conatinerd (containerd/containerd.sock was mapped ad /var/run/docker.sock) with the regular docker client a got the following error Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/json: net/http: HTTP/1.x transport connection broken: malformed HTTP response "x00x00x00x04x00x00x00x00x00".



    Can docker client be used with containerd?










    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Since K8S v1.11 Runtime was changed from dockerd to containerd.
      I'm using Jenkins over kubernetes to build docker images using Docker outside of Docker (dood).



      When I tried to switch to use the socket file from conatinerd (containerd/containerd.sock was mapped ad /var/run/docker.sock) with the regular docker client a got the following error Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/json: net/http: HTTP/1.x transport connection broken: malformed HTTP response "x00x00x00x04x00x00x00x00x00".



      Can docker client be used with containerd?










      share|improve this question













      Since K8S v1.11 Runtime was changed from dockerd to containerd.
      I'm using Jenkins over kubernetes to build docker images using Docker outside of Docker (dood).



      When I tried to switch to use the socket file from conatinerd (containerd/containerd.sock was mapped ad /var/run/docker.sock) with the regular docker client a got the following error Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/json: net/http: HTTP/1.x transport connection broken: malformed HTTP response "x00x00x00x04x00x00x00x00x00".



      Can docker client be used with containerd?







      docker kubernetes dind containerd






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 22 at 16:36









      Yuri Ritvin

      614




      614
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          Disclaimer: as of this writing containerd didn't replace Docker, you can install containerd separately from Docker, and you can point the Kubernetes CRI to directly talk to the containerd socket.



          So, when you install Docker it does install together with containerd and the Docker daemon talks to it. You'll see a process like this:



          docker-containerd --config /var/run/docker/containerd/containerd.toml


          However, the Docker client still talks to the Docker daemon, that's why when you run the Docker client in your container you still need to talk directly to the Docker daemon (/var/run/docker.sock), so you can switch back to /var/run/docker.sock and I believe it should work.






          share|improve this answer





















          • Thanks, We are using K8S as a service in IBM. Can I point the docker daemon to talk with containerd?
            – Yuri Ritvin
            Nov 23 at 7:55











          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%2f53435138%2frunning-docker-inside-kubernetes-with-containerd%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          Disclaimer: as of this writing containerd didn't replace Docker, you can install containerd separately from Docker, and you can point the Kubernetes CRI to directly talk to the containerd socket.



          So, when you install Docker it does install together with containerd and the Docker daemon talks to it. You'll see a process like this:



          docker-containerd --config /var/run/docker/containerd/containerd.toml


          However, the Docker client still talks to the Docker daemon, that's why when you run the Docker client in your container you still need to talk directly to the Docker daemon (/var/run/docker.sock), so you can switch back to /var/run/docker.sock and I believe it should work.






          share|improve this answer





















          • Thanks, We are using K8S as a service in IBM. Can I point the docker daemon to talk with containerd?
            – Yuri Ritvin
            Nov 23 at 7:55















          up vote
          1
          down vote













          Disclaimer: as of this writing containerd didn't replace Docker, you can install containerd separately from Docker, and you can point the Kubernetes CRI to directly talk to the containerd socket.



          So, when you install Docker it does install together with containerd and the Docker daemon talks to it. You'll see a process like this:



          docker-containerd --config /var/run/docker/containerd/containerd.toml


          However, the Docker client still talks to the Docker daemon, that's why when you run the Docker client in your container you still need to talk directly to the Docker daemon (/var/run/docker.sock), so you can switch back to /var/run/docker.sock and I believe it should work.






          share|improve this answer





















          • Thanks, We are using K8S as a service in IBM. Can I point the docker daemon to talk with containerd?
            – Yuri Ritvin
            Nov 23 at 7:55













          up vote
          1
          down vote










          up vote
          1
          down vote









          Disclaimer: as of this writing containerd didn't replace Docker, you can install containerd separately from Docker, and you can point the Kubernetes CRI to directly talk to the containerd socket.



          So, when you install Docker it does install together with containerd and the Docker daemon talks to it. You'll see a process like this:



          docker-containerd --config /var/run/docker/containerd/containerd.toml


          However, the Docker client still talks to the Docker daemon, that's why when you run the Docker client in your container you still need to talk directly to the Docker daemon (/var/run/docker.sock), so you can switch back to /var/run/docker.sock and I believe it should work.






          share|improve this answer












          Disclaimer: as of this writing containerd didn't replace Docker, you can install containerd separately from Docker, and you can point the Kubernetes CRI to directly talk to the containerd socket.



          So, when you install Docker it does install together with containerd and the Docker daemon talks to it. You'll see a process like this:



          docker-containerd --config /var/run/docker/containerd/containerd.toml


          However, the Docker client still talks to the Docker daemon, that's why when you run the Docker client in your container you still need to talk directly to the Docker daemon (/var/run/docker.sock), so you can switch back to /var/run/docker.sock and I believe it should work.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 at 17:39









          Rico

          25.1k94864




          25.1k94864












          • Thanks, We are using K8S as a service in IBM. Can I point the docker daemon to talk with containerd?
            – Yuri Ritvin
            Nov 23 at 7:55


















          • Thanks, We are using K8S as a service in IBM. Can I point the docker daemon to talk with containerd?
            – Yuri Ritvin
            Nov 23 at 7:55
















          Thanks, We are using K8S as a service in IBM. Can I point the docker daemon to talk with containerd?
          – Yuri Ritvin
          Nov 23 at 7:55




          Thanks, We are using K8S as a service in IBM. Can I point the docker daemon to talk with containerd?
          – Yuri Ritvin
          Nov 23 at 7:55


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53435138%2frunning-docker-inside-kubernetes-with-containerd%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

          Trompette piccolo

          Slow SSRS Report in dynamic grouping and multiple parameters

          Simon Yates (cyclisme)