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 ...
随机推荐
- mysql先删除后插入导致死锁
所报的错误为:pymysql.err.OperationalError: (1213, 'Deadlock found when trying to get lock; try restarting ...
- 亚马逊CEO贝索斯致股东信:阐述公司未来计划
亚马逊CEO 杰夫·贝索斯(Jeff Bezos)今天发布年度股东信, 详细描述了亚马逊的产品.服务和未来计划,当然,信中并没有任何的硬数据,比如说亚马逊Kindle的销量等等.但这封信也包括一些颇令 ...
- 第八次ScrumMeeting博客
第八次ScrumMeeting博客 本次会议于11月2日(四)22时整在3公寓725房间召开,持续20分钟. 与会人员:刘畅.辛德泰.窦鑫泽.张安澜.赵奕.方科栋. 1. 每个人的工作(有Issue的 ...
- 第五次ScrumMeeting博客
第五次ScrumMeeting博客 本次会议于10月29日(日)22时整在3公寓725房间召开,持续15分钟. 与会人员:刘畅.辛德泰.窦鑫泽.张安澜.赵奕. 1. 每个人的工作(有Issue的内容和 ...
- loadrunner socket协议问题归纳(5)
获取服务器的返回值,可以用web_reg_save_param函数,该参数最好放到: 语法: int web_reg_save_param(const char *ParamName, <lis ...
- IC设计前后端流程与EDA工具
IC前端设计(逻辑设计)和后端设计(物理设计)的区分: 以设计是否与工艺有关来区分二者:从设计程度上来讲,前端设计的结果就是得到了芯片的门级网表电路. 前端设计的流程及使用的EDA工具 1.架构的设计 ...
- Controller与Switch建立连接
连接建立 控制器和交换机认识的过程. 用于交互Openflow版本,如果不同则没有后续. 同1. 特征请求,控制器询问交换机的特征信息. 交换机回复控制器,相当于把整个交换机的所有配置都告诉控制器了. ...
- HttpWebRequest下载文件,乱码问题解决方案
写在前面 今天之所以会总结HttpWebRequest下载文件,主要是因为在使用该类下载文件的时候,有些地方需要注意一下,在实际的项目中遇到过这种问题,觉得还是有必要总结一下的.在下载文件时,最常见的 ...
- [图算法] 1003. Emergency (25)
As an emergency rescue team leader of a city, you are given a special map of your country. The map s ...
- 201621123037《Java程序设计》第二周学习总结
#Week02-Java基本语法与类库 1. 本周学习总结 关键词:常量池.对象.null.不可变性.string对象拼接.字符串池 关键概念之间的联系:Java中有常量池,超出常量池以外的就会新开辟 ...