Installing kubectl
Installing kubectl
Kubernetes uses a command-line utility called kubectl
for communicating with the cluster API server. The kubectl
binary is available in many operating system package managers, and this option is often much easier than a manual download and install process. You can follow the instructions for your specific operating system or package manager in the Kubernetes documentation to install.
This topic helps you to download and install the Amazon EKS-vended kubectl binaries for MacOS, Linux, and Windows operating systems.
MacOS
This section helps you to install kubectl
for MacOS clients.
To install kubectl
on MacOS
Download the Amazon EKS-vended kubectl binary from Amazon S3:
curl -o kubectl https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.5/2018-12-06/
bin/darwin/amd64/kubectl
(Optional) Verify the downloaded binary with the SHA-256 sum for your binary.
Download the SHA-256 sum for MacOS:
curl -o kubectl.sha256 https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.5/2018-12-06/
bin/darwin/amd64/kubectl.sha256
Check the SHA-256 sum for your downloaded binary.
openssl sha -sha256 kubectl
Compare the generated SHA-256 sum in the command output against your downloaded SHA-256 file. The two should match.
Apply execute permissions to the binary.
chmod +x ./kubectl
Copy the binary to a folder in your
PATH
. If you have already installed a version of kubectl, then we recommend creating a$HOME/bin/kubectl
and ensuring that$HOME/bin
comes first in your$PATH
.mkdir $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$HOME/bin:$PATH
(Optional) Add the
$HOME/bin
path to your shell initialization file so that it is configured when you open a shell.echo 'export PATH=$HOME/bin:$PATH' >> ~/.bash_profile
After you install kubectl, you can verify its version with the following command:
kubectl version --short --client
Linux
This section helps you to install kubectl
for Linux clients.
To install kubectl
on Linux
Download the Amazon EKS-vended kubectl binary from Amazon S3:
curl -o kubectl https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.5/2018-12-06/
bin/linux/amd64/kubectl
(Optional) Verify the downloaded binary with the SHA-256 sum for your binary.
Download the SHA-256 sum for Linux:
curl -o kubectl.sha256 https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.5/2018-12-06/
bin/linux/amd64/kubectl.sha256
Check the SHA-256 sum for your downloaded binary.
openssl sha -sha256 kubectl
Compare the generated SHA-256 sum in the command output against your downloaded SHA-256 file. The two should match.
Apply execute permissions to the binary.
chmod +x ./kubectl
Copy the binary to a folder in your
PATH
. If you have already installed a version of kubectl, then we recommend creating a$HOME/bin/kubectl
and ensuring that$HOME/bin
comes first in your$PATH
.mkdir $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$HOME/bin:$PATH
(Optional) Add the
$HOME/bin
path to your shell initialization file so that it is configured when you open a shell.Note
This step assumes you are using the Bash shell; if you are using another shell, change the command to use your specific shell initialization file.
echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc
After you install kubectl, you can verify its version with the following command:
kubectl version --short --client
Windows
This section helps you to install kubectl
for Windows clients with PowerShell.
To install kubectl
on Windows
Open a PowerShell terminal.
Download the Amazon EKS-vended kubectl binary from Amazon S3:
curl -o kubectl.exe https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.5/2018-12-06/
bin/windows/amd64/kubectl.exe
(Optional) Verify the downloaded binary with the SHA-256 sum for your binary.
Download the SHA-256 sum for Windows:
curl -o kubectl.exe.sha256 https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.5/2018-12-06/
bin/windows/amd64/kubectl.exe.sha256
Check the SHA-256 sum for your downloaded binary.
Get-FileHash kubectl.exe
Compare the generated SHA-256 sum in the command output against your downloaded SHA-256 file. The two should match, although the PowerShell output will be uppercase.
Copy the binary to a folder in your
PATH
. If you have an existing directory in your PATH that you use for command-line utilities, copy the binary to that directory. Otherwise, complete the following steps.Create a new directory for your command-line binaries, such as
C:\bin
.Copy the
kubectl.exe
binary to your new directory.Edit your user or system PATH environment variable to add the new directory to your PATH.
Close your PowerShell terminal and open a new one to pick up the new PATH variable.
After you install kubectl, you can verify its version with the following command:
kubectl version --short --client
refer: https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html
Installing kubectl的更多相关文章
- kubernetes installing and using 单机版
centos安装docker uname -r yum remove docker \ docker-client \ docker-client-latest \ docker-common \ d ...
- installing mysql,this may take a few minutes,hold on plz wdcp卡住解决办法
centos6安装wdcp时make in progress卡住的解决办法 今天在一台centos6的vps上安装wdcp出现的这个问题,到安装程序滚动至下面这里时出现"卡死". ...
- MSI Error 1603 installing AppFabric 1.1 / Win7 x64
MSI Error 1603 installing AppFabric 1.1 / Win7 x64 Archived Forums A-B > AppFabric Caching 先说解 ...
- [转]Installing python 2.7 on centos 6.3. Follow this sequence exactly for centos machine only
Okay for centos 6.4 also On apu.0xdata.loc, after this install was done $ which python /usr/local/bi ...
- [转]Installing SharePoint 2013 on Windows Server 2012 R2
转自:http://www.avivroth.com/2013/07/09/installing-sharepoint-2013-on-windows-server-2012-r2-preview/ ...
- 安装mysql odbc遇到error 1918.errror installing ODBC driver mysql ODBC 5.3 ANSI Drive
环境:Windows server2008r2 安装mysql-connector-odbc-5.3.6-win32 报错 相信错误信息:Error 1918.errror installing OD ...
- Using Confluent’s JDBC Connector without installing the entire platform
转自:https://prefrontaldump.wordpress.com/2016/05/02/using-confluents-jdbc-connector-without-installin ...
- Cocoapods的安装报错 - Error installing pods:activesupport requires Ruby version >=2.2.2
1.打开终端 2 移除现有 Ruby 默认源 输入以下指令 $gem sources --remove https://rubygems.org/ 3.使用新的源 输入以下指令 $gem source ...
- Installing Hadoop on Mac OSX Yosemite Tutorial Part 1.
Installing Hadoop on Mac OSX Yosemite Tutorial Part 1. September 23, 2014 Marek 68 Comments Install ...
随机推荐
- ES6的新特性(6)——正则的扩展
正则的扩展 RegExp 构造函数 在 ES5 中,RegExp构造函数的参数有两种情况. 第一种情况是,参数是字符串,这时第二个参数表示正则表达式的修饰符(flag). var regex = ne ...
- 【转】React-Native 实现增量热更新的思路
所谓热更新就是在不重新安装的前提下进行代码和资源的更新,相信在整个宇宙中还不存在觉得热更新不重要的程序猿. 增量热更新就更牛逼了,只需要把修改过和新增的代码和资源推送给用户下载即可,增量部分的代码和资 ...
- ssd a
Alpha版本测试报告 (1)测试计划 测试人员 工作安排 瞿煌人 制定测试计划,撰写测试报告 周建峰 执行测试,撰写测试报告 注:测试结果Y表示通过测试,N表示未通过测试. 功能 描述 效果 测试结 ...
- Python:字典操作总结
字典是Python中唯一的映射类型 [注]:字典中数据是无序排放的 一.字典的创建方法 方法1:用大括号包裹键值对从而创建字典 addict={}#创建一个空字典 addict={key1:valu ...
- (windows下的)Apache无法启动解决 the requested operation has failed
以下文章是转载别人的,这里只做学习用 ============================================================================== ...
- 有一个集合,判断集合里有没有“world”这个元素,如果有,添加“javaee”
// 有一个集合,判断集合里有没有“world”这个元素,如果有,添加“javaee” List list = new ArrayList(); list.add("world") ...
- 第201天:js---实现继承的5种方式
一.构造函数方式 //构造函数 function People(){ this.race = '汉族'; } People.prototype={ eat:function(){ console.lo ...
- 【loj2319】[NOIP2017]列队 Splay(卡过)
题目描述 给出一个 $n\times m$ 的矩阵,第 $i$ 行第 $j$ 列的数为 $(i-1)\times m+j$ . 现在有 $q$ 次操作,每次操作给出位置 $(x,y)$ ,取出 $(x ...
- wp开发(二)--获取用户篇
本文从个人开发者的角度来谈如何让wp应用获得尽可能多的用户.当然前提是你的app有一定的竞争性,如果不具备竞争力,那再多的用户下载也是白扯,所以最关键的还是要保证app的质量. 一. 程序图标 千万不 ...
- 自动化测试断言Assent的使用
Assent 断言模板包含如下方法: assert.fail(actual, expected, message, operator) assert.ok(value, [message]) asse ...