{"id":1895,"date":"2020-04-10T14:15:38","date_gmt":"2020-04-10T11:15:38","guid":{"rendered":"https:\/\/artem.services\/?p=1874"},"modified":"2020-04-15T16:19:05","modified_gmt":"2020-04-15T13:19:05","slug":"1895","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=1895&lang=en","title":{"rendered":"FIX ERROR &#8212; CentOS 7 kubectl: Invalid choice: &#39;eks&#39;, maybe you meant"},"content":{"rendered":"<p>When trying to execute any &quot;<strong>kubectl<\/strong>&quot; command on an <strong>EKS<\/strong> cluster, the following error occurs:<\/p>\n<blockquote><p>Invalid choice: &#39;eks&#39;, maybe you meant:<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>A possible reason for this is the old version of &quot;<strong>kubectl<\/strong>&quot; available in the repository.<\/p>\n<p>&nbsp;<\/p>\n<h3>Solution:<\/h3>\n<p>Install the latest version of &quot;<strong>kubectl<\/strong>&quot; using <strong>PIP3<\/strong><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo yum install -y python3 python3-pip\r\nsudo pip3 install --upgrade --user awscli\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>To use &quot;<strong>kubectl<\/strong>&quot; installed using <strong>PIP<\/strong>, you need the <strong>PIP<\/strong> binary files directory to be in the <strong>PATH<\/strong> variable, to do this:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nexport PATH=~\/.local\/bin:$PATH\r\nsource ~\/.bash_profile\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>In order not to do this every time, you need to add the line:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nexport PATH=~\/.local\/bin:$PATH\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>In your profile, depends on the shell:<\/p>\n<ul>\n<li><strong>Bash<\/strong> \u2013 .bash_profile, .profile, or .bash_login<\/li>\n<li><strong>Zsh<\/strong> \u2013 .zshrc<\/li>\n<li><strong>Tcsh<\/strong> \u2013 .tcshrc, .cshrc or .login<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>When trying to execute any &quot;kubectl&quot; command on an EKS cluster, the following error occurs: Invalid choice: &#39;eks&#39;, maybe you meant: &nbsp; A possible reason for this is the old version of &quot;kubectl&quot; available in the repository. &nbsp; Solution: Install the latest version of &quot;kubectl&quot; using PIP3 &nbsp; To use &quot;kubectl&quot; installed using PIP, you &hellip; <a href=\"https:\/\/artem.services\/?p=1895&#038;lang=en\" class=\"more-link\">\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u044c<span class=\"screen-reader-text\"> &quot;FIX ERROR &#8212; CentOS 7 kubectl: Invalid choice: &#39;eks&#39;, maybe you meant&quot;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[357],"tags":[1261,1563,361,365,1093,1443],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1895"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1895"}],"version-history":[{"count":2,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1895\/revisions"}],"predecessor-version":[{"id":1897,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1895\/revisions\/1897"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}