{"componentChunkName":"component---src-templates-guides-js","path":"/en/guides/centOS/","result":{"data":{"markdownRemark":{"html":"<h2 id=\"install-kubernetes---centos\"><a href=\"#install-kubernetes---centos\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install Kubernetes - CentOS</h2>\n<p>All the packages introduced below can be download from the link:</p>\n<p><a href=\"https://pan.baidu.com/s/1lWLyyT1jAbADGuxEG3m4gA\" target=\"_blank\">https://pan.baidu.com/s/1lWLyyT1jAbADGuxEG3m4gA</a><br>\nPassword: ge4d</p>\n<h3 id=\"environment-requirement\"><a href=\"#environment-requirement\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Environment Requirement</h3>\n<ul>\n<li>\n<p>Use the IOS installation system (CentOS 7.5) from the link above.</p>\n<p>Path: iManager部署包/软件工具包/OS/OS-ISO/CentOS-7.5-x86_64-Minimal-18.04.iso</p>\n</li>\n<li>When installing the system, all the partitioned file systems select <code class=\"gatsby-code-text\">ext4</code>, except <code class=\"gatsby-code-text\">swap</code> partition. The device select <code class=\"gatsby-code-text\">LVM</code>. The <code class=\"gatsby-code-text\">root(/)</code> partition must occupies 90% or more resources of the total disk.</li>\n<li>\n<p>System Requirements:</p>\n<ul>\n<li>Number of processors: 4 cores+</li>\n<li>Memory: 8 GB+</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"installation-package-preparation\"><a href=\"#installation-package-preparation\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Installation Package Preparation</h3>\n<p>Path: iManager部署包/软件工具包/Kubernetes离线安装包/kubernetes-1.15.1-centos-7.5-deploy.zip</p>\n<h3 id=\"install-kubernetes-master-node\"><a href=\"#install-kubernetes-master-node\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install Kubernetes Master Node</h3>\n<p>Unzip <code class=\"gatsby-code-text\">Kubernetes-1.15.1-centos-7.5-deploy.zip</code>, copy the <code class=\"gatsby-code-text\">offline-Kubernetes-1.15-centos.tar.gz</code> package to any directory of the machine.</p>\n<p>Unzip:</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">tar -zxf offline-kubernetes-1.15-centos.tar.gz</code></pre></div>\n<p>Enter the directory that you unzipped:</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">cd offline-kubernetes-1.15-centos</code></pre></div>\n<p>Execute the following command with root permission:</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">chmod +x install.sh &amp;&amp; ./install.sh master</code></pre></div>\n<blockquote>\n<p>Notes:  </p>\n<p>If you have multiple network cards on the machine, please assign one network card for Kubernetes, execute the command <code class=\"gatsby-code-text\">--apiserver-advertise-address IP</code>(replace the <code class=\"gatsby-code-text\">IP</code> in the command to the actual IP of network card). For instance, if the IP of network card is 172.16.16.9, the completely command should be <code class=\"gatsby-code-text\">chmod +x install.sh &amp;&amp; ./install.sh --apiserver-advertise-address 172.16.16.9</code>.</p>\n</blockquote>\n<p>After installing, you can visit Kubernetes UI by the address <code class=\"gatsby-code-text\">http://IP:31234</code>, please replace the <code class=\"gatsby-code-text\">IP</code> by the actual IP.</p>\n<p>It is ready to install and use iManager after installing the Kubernetes master node. By the increase of demands, add Kubernetes worker nodes anytime.</p>\n<h3 id=\"install-kubernetes-worker-nodeoptional\"><a href=\"#install-kubernetes-worker-nodeoptional\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install Kubernetes Worker Node(Optional)</h3>\n<p>If you need to install the Kubernetes worker node, please prepare another machine, the worker node can not be installed on the same machine of master node.</p>\n<ol>\n<li>\n<p>Execute the command on the worker node to set the node name. If you have multiple node machines, you could set the names like node1, node2, node3…</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\"># Modify node name\nhostnamectl set-hostname node1</code></pre></div>\n</li>\n<li>\n<p>Put the <code class=\"gatsby-code-text\">offline-kubernetes-1.15-centos.tar.gz</code> package in any directory of the Kubernetes worker node machine and unzip:</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">tar -zxvf offline-kubernetes-1.15-centos.tar.gz</code></pre></div>\n</li>\n<li>\n<p>Enter the directory that you unzipped:</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">cd offline-kubernetes-1.15-centos</code></pre></div>\n</li>\n<li>\n<p>Execute the command on the Kubernetes master node to achieve the token:</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">kubeadm token list</code></pre></div>\n</li>\n<li>\n<p>Install worker node:</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">chmod +x install.sh &amp;&amp; ./install.sh join &lt;master-ip&gt;:6443 --token &lt;kubernetes-token&gt;</code></pre></div>\n<blockquote>\n<p>Notes:</p>\n<ul>\n<li><code class=\"gatsby-code-text\">&lt;master-ip&gt;</code> is the IP of master node.</li>\n<li><code class=\"gatsby-code-text\">&lt;kubernetes-token&gt;</code> is the token achieved in step 5.</li>\n<li>If you have multiple network cards on the machine, please assign one network card for Kubernetes, execute the command <code class=\"gatsby-code-text\">--apiserver-advertise-address IP</code>(replace the <code class=\"gatsby-code-text\">IP</code> in the command to the network card’s actual IP). For instance, if the IP of network card is 172.16.16.10, the completely command should be <code class=\"gatsby-code-text\">chmod +x install.sh &amp;&amp; ./install.sh join &lt;master‐ip&gt;:6443 ‐‐token &lt;kubernetes‐token&gt; ‐‐apiserver‐advertise‐address 172.16.16.10</code>.</li>\n</ul>\n</blockquote>\n</li>\n<li>\n<p>Execute the command in master node to verify if the worker node joined the cluster:</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">kubectl get nodes</code></pre></div>\n</li>\n</ol>\n<h3 id=\"faq\"><a href=\"#faq\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>FAQ</h3>\n<ol>\n<li>\n<p>If you could not achieve the token from the master node, please execute the following command on the master node:</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">kubeadm token create</code></pre></div>\n</li>\n<li>\n<p>If the error in below occurs when installing the worker node, it means the token was expired, you need to create a new token in the master node by the command ‘Kubeadm token create’.</p>\n<p>Error:</p>\n<div class=\"gatsby-highlight\" data-language=\"none\"><pre class=\"gatsby-code-none\"><code class=\"gatsby-code-none\">couldn't validate the identify of the API server: abort connection to API server after timeout of 5m0s</code></pre></div>\n</li>\n<li>\n<p>If you want to remove the worker node from Kubernetes cluster, execute the command on the master node:</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">kubectl delete node &lt;nodeName&gt;</code></pre></div>\n<blockquote>\n<p>Notes:  </p>\n<p><code class=\"gatsby-code-text\">&lt;nodeName&gt;</code> is the name of the worker node you would like to remove.</p>\n</blockquote>\n</li>\n<li>\n<p>Please execute the following command to reset the removed node.</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">kubeadm reset</code></pre></div>\n</li>\n<li>\n<p>If you want to rejoin the removed worker node in the Kubernetes cluster, please execute the command:</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">kubeadm join &lt;master-ip&gt;:6443 --token &lt;kubernetes-token&gt; --discovery-token-unsafe-skip-ca-verification</code></pre></div>\n<blockquote>\n<p>Notes:</p>\n<ul>\n<li><code class=\"gatsby-code-text\">&lt;master-ip&gt;</code> is the IP of master node.</li>\n<li><code class=\"gatsby-code-text\">&lt;kubernetes-token&gt;</code> is the token achieved by checking the master node.</li>\n</ul>\n</blockquote>\n</li>\n<li>\n<p>If you want to uninstall Kubernetes, please execute the command in the root directories(both master and worker nodes):</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"gatsby-code-sh\"><code class=\"gatsby-code-sh\">chmod +x install.sh &amp;&amp; ./install.sh down</code></pre></div>\n</li>\n</ol>","frontmatter":{"title":"Guides","next":null,"prev":null},"fields":{"path":"content/guides/centOS.en.md","slug":"/en/guides/centOS/","langKey":"en"}}},"pageContext":{"slug":"/en/guides/centOS/"}}}