1"use strict";(self.webpackChunkkinvolk=self.webpackChunkkinvolk||[]).push([[6],{94582:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>i,metadata:()=>r,toc:()=>c});var s=t(74848),o=t(28453);const i={authors:["iago-lopez"],title:"What's new in kube-spawn",description:"",draft:!1,tags:["kube-spawn","kubernetes","systemd","nspawn","containers","machinectl","kubeadm"],categories:["Containers","Kubernetes","Tools","Project"],image:"./kubespawn-logo.svg",slug:"2017/12/whats-new-in-kube-spawn"},a=void 0,r={permalink:"/blog/2017/12/whats-new-in-kube-spawn",source:"@site/blog/2017-12-05-whats-new-in-kube-spawn/index.md",title:"What's new in kube-spawn",description:"",date:"2017-12-05T00:00:00.000Z",tags:[{inline:!0,label:"kube-spawn",permalink:"/blog/tags/kube-spawn"},{inline:!0,label:"kubernetes",permalink:"/blog/tags/kubernetes"},{inline:!0,label:"systemd",permalink:"/blog/tags/systemd"},{inline:!0,label:"nspawn",permalink:"/blog/tags/nspawn"},{inline:!0,label:"containers",permalink:"/blog/tags/containers"},{inline:!0,label:"machinectl",permalink:"/blog/tags/machinectl"},{inline:!0,label:"kubeadm",permalink:"/blog/tags/kubeadm"}],hasTruncateMarker:!1,authors:[{name:"Iago L\xf3pez Galeiras",key:"iago-lopez"}],frontMatter:{authors:["iago-lopez"],title:"What's new in kube-spawn",description:"",draft:!1,tags:["kube-spawn","kubernetes","systemd","nspawn","containers","machinectl","kubeadm"],categories:["Containers","Kubernetes","Tools","Project"],image:"./kubespawn-logo.svg",slug:"2017/12/whats-new-in-kube-spawn"},unlisted:!1,prevItem:{title:"Introducing the Habitat Kubernetes Exporter",permalink:"/blog/2017/12/habitat-kubernetes-exporter-intro"},nextItem:{title:"Kubernetes The Hab Way",permalink:"/blog/2017/12/kubernetes-the-hab-way"}},l={image:t(64517).A,authorsImageUrls:[void 0]},c=[{value:"CLI redesign",id:"cli-redesign",level:2},{value:"Multi-cluster support",id:"multi-cluster-support",level:2},{value:"Dev workflow support",id:"dev-workflow-support",level:2},{value:"kube-spawn, a certified Kubernetes distribution",id:"kube-spawn-a-certified-kubernetes-distribution",level:2},{value:"Conclusion",id:"conclusion",level:2}];function u(e){const n={a:"a",code:"code",h2:"h2",img:"img",p:"p",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["There\u2019s been a number of changes in kube-spawn ",(0,s.jsx)(n.a,{href:"https://github.com/kinvolk/kube-spawn/releases",children:"kube-spawn"})," since ",(0,s.jsx)(n.a,{href:"https://kinvolk.io/blog/2017/08/introducing-kube-spawn-a-tool-to-create-local-multi-node-kubernetes-clusters/",children:"we announced it"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["The main focus of the recent developments was improving the CLI, supporting several clusters running in parallel, and enabling developers to test Kubernetes patches easily. In addition, we've added a ",(0,s.jsx)(n.a,{href:"https://github.com/kinvolk/kube-spawn/tree/v0.2.1/doc",children:"bunch of documentation"}),", improved error messages and, of course, fixed a lot of bugs."]}),"\n",(0,s.jsx)(n.h2,{id:"cli-redesign",children:"CLI redesign"}),"\n",(0,s.jsxs)(n.p,{children:["We\u2019ve completely redesigned the CLI commands used to interact with kube-spawn. You can now use ",(0,s.jsx)(n.code,{children:"create"})," to generate the cluster environment, and then ",(0,s.jsx)(n.code,{children:"start"})," to boot and provision the cluster. The convenience ",(0,s.jsx)(n.code,{children:"up"})," command does the two steps in one so you can quickly get a cluster with only one command."]}),"\n",(0,s.jsxs)(n.p,{children:["Once a cluster is up and running you can use ",(0,s.jsx)(n.code,{children:"stop"})," to stop it and keep it there to start it again later, or ",(0,s.jsx)(n.code,{children:"restart"})," to ",(0,s.jsx)(n.code,{children:"stop"})," and ",(0,s.jsx)(n.code,{children:"start"})," the cluster."]}),"\n",(0,s.jsxs)(n.p,{children:["The command ",(0,s.jsx)(n.code,{children:"destroy"})," will take a cluster in the stopped or running state and remove it completely, including any disk space the cluster was using."]}),"\n",(0,s.jsx)(n.p,{children:"The following diagram provides a visualization of the CLI workflow."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Visualization of the CLI workflow",src:t(73904).A+"",width:"802",height:"372"})}),"\n",(0,s.jsx)(n.h2,{id:"multi-cluster-support",children:"Multi-cluster support"}),"\n",(0,s.jsxs)(n.p,{children:["Previously, users could only run one cluster at the time. With the flag ",(0,s.jsx)(n.code,{children:"--cluster-name"}
1)," flag, running multiple clusters in parallel is now possible."]}),"\n",(0,s.jsxs)(n.p,{children:["All the CLI operations can take ",(0,s.jsx)(n.code,{children:"--cluster-name"})," to specify which cluster you\u2019re referring to. To see your currently created clusters, a new command ",(0,s.jsx)(n.code,{children:"list"})," was added to kube-spawn."]}),"\n",(0,s.jsx)(n.p,{children:"This is especially useful when you want to test how your app behaves in different Kubernetes versions or, as a Kubernetes developer, when you made a change to Kubernetes itself and want to compare a cluster without changes and another with your change side-by-side. Which leads us to the next feature."}),"\n",(0,s.jsx)(n.h2,{id:"dev-workflow-support",children:"Dev workflow support"}),"\n",(0,s.jsxs)(n.p,{children:["kube-spawn makes testing changes to Kubernetes really easy. You just need to build your Hyperkube Docker image with a particular ",(0,s.jsx)(n.code,{children:"VERSION"})," tag. Once that\u2019s built, you need to start kube-spawn with the ",(0,s.jsx)(n.code,{children:"--dev"})," flag, and set ",(0,s.jsx)(n.code,{children:"--hyperkube-tag"})," to the same name you used when building the Hyperkube image."]}),"\n",(0,s.jsxs)(n.p,{children:["Taking advantage of the aforementioned multi-cluster support, you can build current Kubernetes master, start a cluster with ",(0,s.jsx)(n.code,{children:"--cluster-name=master"}),", build Kubernetes your patch, and start another cluster with ",(0,s.jsx)(n.code,{children:"--cluster-name=fix"}),". You\u2019ll now have two clusters to check how your patch behaves in comparison with an unpatched Kubernetes."]}),"\n",(0,s.jsxs)(n.p,{children:["You can find a detailed step-by-step example of this in ",(0,s.jsx)(n.a,{href:"https://github.com/kinvolk/kube-spawn/blob/v0.2.1/doc/dev-workflow.md",children:"kube-spawn\u2019s documentation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"kube-spawn-a-certified-kubernetes-distribution",children:"kube-spawn, a certified Kubernetes distribution"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"certified kubernetes",src:t(97075).A+"",width:"298",height:"403"})}),"\n",(0,s.jsxs)(n.p,{children:["We\u2019ve successfully run the ",(0,s.jsx)(n.a,{href:"https://github.com/cncf/k8s-conformance",children:"Kubernetes Software Conformance Certification tests"})," based on ",(0,s.jsx)(n.a,{href:"https://github.com/heptio/sonobuoy",children:"Sonobuoy"})," for Kubernetes v1.7 and v1.8. We\u2019ve ",(0,s.jsx)(n.a,{href:"https://github.com/cncf/k8s-conformance/pull/98",children:"submitted"})," ",(0,s.jsx)(n.a,{href:"https://github.com/cncf/k8s-conformance/pull/99",children:"the results"})," to CNCF and they merged our PRs. This means kube-spawn is now a ",(0,s.jsx)(n.a,{href:"https://docs.google.com/spreadsheets/d/1LxSqBzjOxfGx3cmtZ4EbB_BGCxT_wlxW_xgHVVa23es",children:"certified Kubernetes distribution"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,s.jsx)(n.p,{children:"With the above additions, we feel like kube-spawn is one of the best tools for developing on Linux with, and on, Kubernetes."}),"\n",(0,s.jsxs)(n.p,{children:["If you want to try it out, we've just released ",(0,s.jsx)(n.a,{href:"https://github.com/kinvolk/kube-spawn/releases/tag/v0.2.1",children:"kube-spawn v0.2.1"}),". We look forward to your feedback and welcome issues or PRs on the ",(0,s.jsx)(n.a,{href:"https://github.com/kinvolk/kube-spawn",children:"Github project"}),"."]})]})}function d(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},64517:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/kubespawn-logo-047f17fa86ddfab8c42e509de2868e19.svg"},97075:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/certified_kubernetes-a7d3b8002d34cd82914b613d662e6a0b.svg"},73904:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/kubespawn-lifecycle-43df9a7213b1cafcf1f7ad8bbbb94d6f.svg"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var s=t(96540);const o={},i=s.createContext(o);function a(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.