成都建筑网站建设,网站推广书,python免费编程软件,房地产行业现状及前景序
之前使用multipass装ubuntu#xff0c;然后再用microk8s搭建k8s#xff0c;这会直接用orbstack及kind在本地搭建k8s及istio
安装
orbstack
通过orbstack这个地址下载#xff0c;主要是开销低#xff0c;用来替代docker desktop
添加国内源 ~/.orbstack/config/dock…序
之前使用multipass装ubuntu然后再用microk8s搭建k8s这会直接用orbstack及kind在本地搭建k8s及istio
安装
orbstack
通过orbstack这个地址下载主要是开销低用来替代docker desktop
添加国内源 ~/.orbstack/config/docker.json
{registry-mirrors: [http://hub-mirror.c.163.com,https://docker.mirrors.ustc.edu.cn,https://registry.docker-cn.com,https://registry.hub.docker.com]
}重启orbstack 安装go
brew install go
go env -w GO111MODULEon
go env -w GOPROXYhttps://goproxy.cn,direct安装kind
go install sigs.k8s.io/kindv0.20.0
export PATH$HOME/go/bin:$PATH
kind create cluster
Creating cluster kind ...
⢎⡠ Ensuring node image (kindest/node:v1.27.3)
⢎⠁ Ensuring node image (kindest/node:v1.27.3) ✓ Ensuring node image (kindest/node:v1.27.3) ✓ Preparing nodes ✓ Writing configuration
⠎⠁ Starting control-plane ️
⠈⠁ Starting control-plane ️
⠈⠱ Starting control-plane ️
⠈⡱ Starting control-plane ️✓ Starting control-plane ️✓ Installing CNI ✓ Installing StorageClass
Set kubectl context to kind-kind
You can now use your cluster with:kubectl cluster-info --context kind-kindHave a nice day! 使用
kubectl cluster-info --context kind-kind
Kubernetes control plane is running at https://127.0.0.1:51562
CoreDNS is running at https://127.0.0.1:51562/api/v1/namespaces/kube-system/services/kube-dns:dns/proxykubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-5d78c9869d-2rjmk 1/1 Running 0 2m9s
kube-system coredns-5d78c9869d-n72hp 1/1 Running 0 2m9s
kube-system etcd-kind-control-plane 1/1 Running 0 2m23s
kube-system kindnet-tjvh9 1/1 Running 0 2m10s
kube-system kube-apiserver-kind-control-plane 1/1 Running 0 2m24s
kube-system kube-controller-manager-kind-control-plane 1/1 Running 0 2m23s
kube-system kube-proxy-sjg2h 1/1 Running 0 2m10s
kube-system kube-scheduler-kind-control-plane 1/1 Running 0 2m23s
local-path-storage local-path-provisioner-6bc4bddd6b-hpzrd 1/1 Running 0 2m9s安装istio
curl -L https://git.io/getLatestIstio | ISTIO_VERSION1.2.5 sh -或者下载https://github.com/istio/istio/releases/download/1.18.2/istio-1.18.2-osx-arm64.tar.gz 解压并将istio-1.18.2/bin添加到PATH中
istioctl install --set profiledemo -y
✔ Istio core installed
✔ Istiod installed
✔ Egress gateways installed
✔ Ingress gateways installed
✔ Installation complete Making this installation the default for injection and validation.kubectl get ns
NAME STATUS AGE
default Active 75m
istio-system Active 104s
kube-node-lease Active 75m
kube-public Active 75m
kube-system Active 75m
local-path-storage Active 75m
➜ ~ kubectl get pods -n istio-system
NAME READY STATUS RESTARTS AGE
istio-egressgateway-75db994b58-jdztx 1/1 Running 0 61s
istio-ingressgateway-79bb75ddbb-965t8 1/1 Running 0 61s
istiod-68cb9f5cb6-jksg5 1/1 Running 0 115s小结
使用orbstack及kind在本地搭建k8s及istio显得极为轻量首先orbstack比multipass起个machine轻量许多其次kind比k3sminikube更为轻量虽然是单节点但是特别适合学习和研究。
doc
orbstackkind安装istio