This article updates many tools that have failed to install on the Internet, such as krew and KinD.
The use time of this test is 2023/7/20, basically the latest version or the latest stable version.
Front
Helm is a package management tool for Kubernetes that simplifies the deployment and management of Kubernetes applications. Helm uses a packaging format called a "chart" to organize and describe a set of related Kubernetes resources.
The structure of a chart is roughly as follows, and the notes annotate the role of the file (the test should have Chart.yaml, values.yaml (no dynamic assignment or even need), and the templates directory):
my-chart/
│
├── Chart.yaml # Chart 的基本信息,如名称、版本、描述等,该文件必需
├── values.yaml # Chart 的默认配置值,安装 Chart 时可提供一个自定义values.yaml 文件或--set参数覆盖这些默认值。
├── templates/ # k8s资源模板文件,这些模板文件用 Go 模板语言编写,可根据 values.yaml 中配置值动态生成最后k8s资源。
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── ingress.yaml
│ └── ...
│
├── charts/ # 依赖的其他 Helm chart(可选),可用Helm依赖管理功能自动下载和安装依赖的chart。
├── .helmignore # Helm 忽略文件列表(可选),类似于 .gitignore用于指定打包 Chart 时需忽略的文件和目录
└── README.md # Chart 的说明文档(可选),通常包括安装方法、配置选项等
sudo lsof -i :80 -i :443 # 查看端口80和443是否被占用
install helm on linux
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh # 会默认安装到/usr/local/bin/helm
Install KinD on Linux (most of the online tutorials are invalid)
This article uses kind v0.11.1 go1.16.4 linux/amd64
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/ # sudo mv ./kind /usr/local/bin/
Linux installation kubectl (k8s official website: install and set kubectl | Kubernetes in Linux system )
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl version --client # 执行测试,以保障你安装的版本是最新的
kubectl version --client --output=yaml # 查看版本的详细信息
Install krew (most of the online tutorials are invalid)
Reference https://github.com/kubernetes-sigs/krew/releases
wget https://github.com/kubernetes-sigs/krew/releases
wget https://github.com/kubernetes-sigs/krew/releases/download/v0.4.4/krew.yaml
tar zxvf krew.tar.gz
./krew-linux_amd64 install krew
echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
You can also install the hlf plugin
kubectl krew install hlf
Install the service grid istio, make sure you can use the command istioctl
curl -L https://istio.io/downloadIstio | sh -
chmod +x istio-*
sudo mv istio-*/bin/istioctl /usr/local/bin/
istioctl operator init