wiki/tools.kubernetes.html
2022-07-29 15:41:17 +00:00

36 lines
13 KiB
HTML

<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>Kubernetes</title><script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script><script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script><script type="text/x-mathjax-config">
MathJax = {
tex: {
inlineMath: [ [&#x27;$&#x27;,&#x27;$&#x27;], [&#x27;\(&#x27;,&#x27;\)&#x27;] ],
displayMath: [ [&#x27;$$&#x27;,&#x27;$$&#x27;], [&#x27;[&#x27;,&#x27;]&#x27;] ]
},
options = {
processHtmlClass = &quot;math&quot;
}
}
</script><meta name="next-head-count" content="6"/><link rel="preload" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" as="style"/><link rel="stylesheet" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" data-n-g=""/><noscript data-n-css=""></noscript><link rel="preload" href="/wiki/_next/static/chunks/main-ae4733327bd95c4ac325.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/framework.9d524150d48315f49e80.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/commons.0e1c3f9aa780c2dfe9f0.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/_app-8e3d0c58a60ec788aa69.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/940643274e605e7596ecea1f2ff8d83317a3fb76.4841a16762f602a59f00.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/%5B%5B...slug%5D%5D-1aa198f87ede1cd0e1dc.js" as="script"/></head><body><div id="__next"><main><h1>Kubernetes</h1><section class="post-metadata"><span>Date: <!-- -->2021-06-13 14:37:01 +08:00</span><span>Date modified: <!-- -->2021-06-14 22:42:48 +08:00</span></section><nav class="toc"><ol class="toc-level toc-level-1"></ol></nav><p>Kubernetes is a container orchestrator letting you manage hundreds of containers at a time.
While managing multiple containers with engines such as Docker and Podman, it is not really feasible if you want hundreds of them.
</p><p>Kubernetes is composed of multiple components and can be intermingled with other related tools.
For this, pre-bundled solutions (also known as distributions) such as <a href="http://k3s.io/">K3s</a> exists with some related tools embedded to make installation easier.
</p><p>Most installations feature the <a href="/wiki/cli.kubectl">kubectl</a> that controls the Kubernetes cluster.
This is the program that you&#x27;ll most likely going to pay attention to.
</p><ul><li><p>composed of multiple smaller components:
</p><ul><li><p>kubelet runs on all nodes, managing nodes — i.e., notifying the API server where the nodes belongs to
</p></li><li><p>kubeconfig is the term for a Kubernetes cluster configuration;
mainly written in YAML file
</p></li></ul></li><li><p>Kubernetes uses the building blocks structure (or resources) that composes of simple blocks that can be combined to create complex operations
</p></li><li><p>it also has extensibility mainly through exposing the API and letting you create custom resource definitions to fully extend Kubernetes with your app
</p></li><li><p>Kubernetes manages the cluster along with some resources
</p><ul><li><p><strong>the nodes which contain multiple pods</strong></p><ul><li><p>nodes are categorized either as a master or a worker node
</p></li><li><p>a master node is where the control plane is located
</p></li><li><p>a worker node is where the data plane is located
</p></li></ul></li><li><p><strong>pods which is a collection of containers</strong>;
usually, they are managed indirectly with deployments or resource sets;
while pods can run multiple containers, it often contains one container as a recommended practice
</p></li><li><p><strong>deployments create the specification of the application state</strong></p></li><li><p><strong>replica sets ensure that pods are running at any given time even while replacing the pods</strong></p></li><li><p><strong>configmaps manages secrets in the cluster</strong>;
this includes passing configurations between different pods;
secrets are either set imperatively (in the command line) or declaratively (from a file)
</p></li><li><p><strong>namespaces separates application from each other</strong>, similarly to namespacing found in programming languages — e.g., Rust with modules, C++ namespaces, etc.
</p></li></ul></li><li><p>while you can manage resources in the command line, you can create manifests that Kubernetes can simply apply
</p><ul><li><p>think of it as declarative way of cluster management (i.e., with files) instead of imperative (i.e., invoking in the command line)
</p></li></ul></li></ul><section><h2>Backlinks</h2><ul><li><a href="/wiki/cli.kubectl">Command line: kubectl</a></li></ul></section></main></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"metadata":{"date":"\"2021-06-13 14:37:01 +08:00\"","date_modified":"\"2021-06-14 22:42:48 +08:00\"","language":"en","source":""},"title":"Kubernetes","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Kubernetes is a container orchestrator letting you manage hundreds of containers at a time.\nWhile managing multiple containers with engines such as Docker and Podman, it is not really feasible if you want hundreds of them.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Kubernetes is composed of multiple components and can be intermingled with other related tools.\nFor this, pre-bundled solutions (also known as distributions) such as "},{"type":"element","tagName":"a","properties":{"href":"http://k3s.io/"},"children":[{"type":"text","value":"K3s"}]},{"type":"text","value":" exists with some related tools embedded to make installation easier.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Most installations feature the "},{"type":"element","tagName":"a","properties":{"href":"/cli.kubectl"},"children":[{"type":"text","value":"kubectl"}]},{"type":"text","value":" that controls the Kubernetes cluster.\nThis is the program that you'll most likely going to pay attention to.\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"composed of multiple smaller components:\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"kubelet runs on all nodes, managing nodes — i.e., notifying the API server where the nodes belongs to\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"kubeconfig is the term for a Kubernetes cluster configuration;\n mainly written in YAML file\n"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Kubernetes uses the building blocks structure (or resources) that composes of simple blocks that can be combined to create complex operations\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"it also has extensibility mainly through exposing the API and letting you create custom resource definitions to fully extend Kubernetes with your app\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Kubernetes manages the cluster along with some resources\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"the nodes which contain multiple pods"}]}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"nodes are categorized either as a master or a worker node\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"a master node is where the control plane is located\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"a worker node is where the data plane is located\n"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"pods which is a collection of containers"}]},{"type":"text","value":";\n usually, they are managed indirectly with deployments or resource sets;\n while pods can run multiple containers, it often contains one container as a recommended practice\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"deployments create the specification of the application state"}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"replica sets ensure that pods are running at any given time even while replacing the pods"}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"configmaps manages secrets in the cluster"}]},{"type":"text","value":";\n this includes passing configurations between different pods;\n secrets are either set imperatively (in the command line) or declaratively (from a file)\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"namespaces separates application from each other"}]},{"type":"text","value":", similarly to namespacing found in programming languages — e.g., Rust with modules, C++ namespaces, etc.\n"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"while you can manage resources in the command line, you can create manifests that Kubernetes can simply apply\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"think of it as declarative way of cluster management (i.e., with files) instead of imperative (i.e., invoking in the command line)\n"}]}]}]}]}]}]},"backlinks":[{"path":"/cli.kubectl","title":"Command line: kubectl"}]},"__N_SSG":true},"page":"/[[...slug]]","query":{"slug":["tools.kubernetes"]},"buildId":"Ie9t5zutrXP6Of75Cb5xF","assetPrefix":"/wiki","nextExport":false,"isFallback":false,"gsp":true}</script><script nomodule="" src="/wiki/_next/static/chunks/polyfills-99d808df29361cf7ffb1.js"></script><script src="/wiki/_next/static/chunks/main-ae4733327bd95c4ac325.js" async=""></script><script src="/wiki/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js" async=""></script><script src="/wiki/_next/static/chunks/framework.9d524150d48315f49e80.js" async=""></script><script src="/wiki/_next/static/chunks/commons.0e1c3f9aa780c2dfe9f0.js" async=""></script><script src="/wiki/_next/static/chunks/pages/_app-8e3d0c58a60ec788aa69.js" async=""></script><script src="/wiki/_next/static/chunks/940643274e605e7596ecea1f2ff8d83317a3fb76.4841a16762f602a59f00.js" async=""></script><script src="/wiki/_next/static/chunks/pages/%5B%5B...slug%5D%5D-1aa198f87ede1cd0e1dc.js" async=""></script><script src="/wiki/_next/static/Ie9t5zutrXP6Of75Cb5xF/_buildManifest.js" async=""></script><script src="/wiki/_next/static/Ie9t5zutrXP6Of75Cb5xF/_ssgManifest.js" async=""></script></body></html>