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 ...
随机推荐
- django的htpp请求之WSGIRequest
WSGIRequest对象 Django在接收到http请求之后,会根据http请求携带的参数以及报文信息创建一个WSGIRequest对象,并且作为视图函数第一个参数传给视图函数.这个参数就是dja ...
- Visiting a Friend(思维)
Description Pig is visiting a friend. Pig's house is located at point 0, and his friend's house is l ...
- 福大软工1816 - 404 Note Found选题报告
目录 NABCD分析引用 N(Need,需求): A(Approach,做法): B(Benefit,好处): C(Competitors,竞争): D(Delivery,交付): 初期 中期 个人贡 ...
- Log4Net的使用研究(一)
等待研究中………… 20160421 标题:C#使用Log4Net记录日志 文章地址: http://www.cnblogs.com/wangsaiming/archive/2013/01/11/ ...
- lintcode-496-玩具工厂
496-玩具工厂 工厂模式是一种常见的设计模式.请实现一个玩具工厂 ToyFactory 用来产生不同的玩具类.可以假设只有猫和狗两种玩具. 您在真实的面试中是否遇到过这个题? Yes 样例 ToyF ...
- 实现Spring管理struts的Action
struts2和spring的整合,关键点在于struts2中的action要纳入spring容器的管理中成为一个bean. 可以在struts2中配置: <struts> ...
- Hibernate 中 load() 方法导致的 noSession 异常
之所以要写这个,是因为最近碰到了一个延迟加载的 load() 导致出现 noSession 的异常. 下面第三种方式解决这个问题需要用到一个本地线程的对象,也就是 ThreadLocal 类,之前写过 ...
- 有道云笔记web版本居然不支持火狐
好尴尬的火狐呀....
- 【.Net+数据库】sqlserver的四种分页方式
第一种:ROW_NUMBER() OVER()方式 select * from ( select *, ROW_NUMBER() OVER(Order by ArtistId ) AS RowId ...
- Struts的xml包必须继承Struts-default 不然不能使用拦截器与返回类型的功能
Struts的xml包必须继承Struts-default 不然不能使用拦截器与返回类型的功能