Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Netdata | 63,260 | 18 hours ago | 325 | gpl-3.0 | C | |||||
Real-time performance monitoring, done right! https://www.netdata.cloud | ||||||||||
Devops Exercises | 43,460 | 4 days ago | 14 | other | Python | |||||
Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions | ||||||||||
Traefik | 43,257 | 18 | 2 days ago | 160 | September 16, 2022 | 621 | mit | Go | ||
The Cloud Native Application Proxy | ||||||||||
Kong | 34,952 | 16 hours ago | 232 | apache-2.0 | Lua | |||||
🦍 The Cloud-Native API Gateway | ||||||||||
Awesome Cheatsheets | 33,674 | 2 days ago | 83 | mit | JavaScript | |||||
👩💻👨💻 Awesome cheatsheets for popular programming languages, frameworks and development tools. They include everything you should know in one single file. | ||||||||||
Portainer | 25,661 | 1 | a day ago | 78 | April 21, 2021 | 1,134 | zlib | Go | ||
Making Docker and Kubernetes management easy. | ||||||||||
Dokku | 24,646 | 2 | 19 hours ago | 77 | April 22, 2021 | 40 | mit | Shell | ||
A docker-powered PaaS that helps you build and manage the lifecycle of applications | ||||||||||
Faas | 23,110 | 9 | 2 days ago | 31 | April 12, 2021 | 30 | mit | Go | ||
OpenFaaS - Serverless Functions Made Simple | ||||||||||
Docker_practice | 22,409 | 9 days ago | 9 | December 01, 2021 | 7 | Go | ||||
Learn and understand Docker&Container technologies, with real DevOps practice! | ||||||||||
Rancher | 21,091 | 20 | 17 hours ago | 207 | April 25, 2021 | 2,472 | apache-2.0 | Go | ||
Complete container management platform |
中文 | English
说明:
docker pull k8s.gcr.io/pause:3.8
测试镜像拉取成功,本项目相关部分可以直接跳过。git checkout v1.25.4
git checkout v1.25.2
git checkout v1.25.0
git checkout v1.24.2
git checkout v1.24.0
git checkout v1.23.4
git checkout v1.22.5
git checkout v1.22.4
git checkout v1.21.5
git checkout v1.21.4
git checkout v1.21.3
git checkout v1.21.2
git checkout v1.21.1
git checkout v1.19.3
git checkout v1.19.2
git checkout v1.18.8
git checkout v1.18.6
git checkout v1.18.3
git checkout v1.16.5
git checkout v1.15.5
git checkout v1.15.4
git checkout v1.14.8
git checkout v1.14.7
git checkout v1.14.6
git checkout v1.14.3
git checkout v1.14.1
git checkout v1.13.0
git checkout v1.10.11
注:如果发现K8s版本与您的环境不一致,可以修改images.properties
文件指明所需镜像版本,欢迎Pull Request。
为 Docker daemon 配置镜像加速,参考阿里云镜像服务 或中科大镜像加速地址https://docker.mirrors.ustc.edu.cn
可选操作: 为 Kubernetes 配置 CPU 和 内存资源,建议分配 4GB 或更多内存。
从阿里云镜像服务下载 Kubernetes 所需要的镜像
在 Mac 上执行如下脚本
./load_images.sh
在Windows上,使用 PowerShell
.\load_images.ps1
说明:
Set-ExecutionPolicy RemoteSigned
命令。images.properties
文件自行加载你自己需要的镜像开启 Kubernetes,并等待 Kubernetes 开始运行
TIPS:
在Mac上:
如果在Kubernetes部署的过程中出现问题,可以通过docker desktop应用日志获得实时日志信息:
pred='process matches ".*(ocker|vpnkit).*"
|| (process in {"taskgated-helper", "launchservicesd", "kernel"} && eventMessage contains[c] "docker")'
/usr/bin/log stream --style syslog --level=debug --color=always --predicate "$pred"
在Windows上:
如果在Kubernetes部署的过程中出现问题,可以在 C:\ProgramData\DockerDesktop下的service.txt 查看Docker日志, 在 C:\Users\yourUserName\AppData\Local\Docker下的log.txt 查看Kubernetes日志
问题诊断:
如果看到 Kubernetes一直在启动状态,请参考
rm -fr '~/Library/Group\ Containers/group.com.docker/pki'
可选操作: 切换Kubernetes运行上下文至 docker-desktop (之前版本的 context 为 docker-for-desktop)
kubectl config use-context docker-desktop
验证 Kubernetes 集群状态
kubectl cluster-info
kubectl get nodes
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.5.1/aio/deploy/recommended.yaml
或
kubectl apply -f kubernetes-dashboard.yaml
检查 kubernetes-dashboard 应用状态
kubectl get pod -n kubernetes-dashboard
开启 API Server 访问代理
kubectl proxy
通过如下 URL 访问 Kubernetes dashboard
授权kube-system
默认服务账号
kubectl apply -f kube-system-default.yaml
对于Mac环境
TOKEN=$(kubectl -n kube-system describe secret default| awk '$1=="token:"{print $2}')
kubectl config set-credentials docker-desktop --token="${TOKEN}"
echo $TOKEN
对于Windows环境
$TOKEN=((kubectl -n kube-system describe secret default | Select-String "token:") -split " +")[1]
kubectl config set-credentials docker-desktop --token="${TOKEN}"
echo $TOKEN
选择 令牌
输入上文控制台输出的内容
或者选择 Kubeconfig 文件,路径如下:
Mac: $HOME/.kube/config
Win: %UserProfile%\.kube\config
点击登陆,进入Kubernetes Dashboard
说明:如果测试 Istio,不需要安装 Ingress
- 若安装脚本无法安装,可以跳转到该地址查看最新操作
安装
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.2.0/deploy/static/provider/cloud/deploy.yaml
或
kubectl apply -f ingress-nginx-controller.yaml
验证
kubectl get pods --all-namespaces -l app.kubernetes.io/name=ingress-nginx
部署测试应用,详情参见社区文章
kubectl create -f sample/apple.yaml
kubectl create -f sample/banana.yaml
kubectl create -f sample/ingress.yaml
测试示例应用
$ curl -kL http://localhost/apple
apple
$ curl -kL http://localhost/banana
banana
删除示例应用
kubectl delete -f sample/apple.yaml
kubectl delete -f sample/banana.yaml
kubectl delete -f sample/ingress.yaml
kubectl delete -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.2.0/deploy/static/provider/cloud/deploy.yaml
或
kubectl delete -f ingress-nginx-controller.yaml
可以根据文档安装 helm v3 https://helm.sh/docs/intro/install/ 在国内由于helm的cdn节点使用的是谷歌云所以可能访问不到,可以参考已存在的官方issue: https://github.com/helm/helm/issues/7028
# Use homebrew on Mac
brew install helm
# Add helm repo
helm repo add stable http://mirror.azure.cn/kubernetes/charts/
# Update charts repo
helm repo update
如果在后续使用 helm 安装组件的过程中出现版本兼容问题,可以参考 通过二进制包安装
思路安装匹配的版本
# Use Chocolatey on Windows
# 注:安装的时候需要保证网络能够访问googleapis这个域名
choco install kubernetes-helm
# Change helm repo
helm repo add stable http://mirror.azure.cn/kubernetes/charts/
# Update charts repo
helm repo update
安装 Wordpress
helm install wordpress stable/wordpress
查看 wordpress 发布状态
helm status wordpress
卸载 wordpress 发布
helm uninstall wordpress
说明:Istio Ingress Gateway和Ingress缺省的端口冲突,请移除Ingress并进行下面测试
可以根据文档安装 Istio https://istio.io/docs/setup/getting-started/
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.5.0 sh -
cd istio-1.5.0
export PATH=$PWD/bin:$PATH
在Windows上,您可以手工下载Istio安装包,或者把getLatestIstio.ps1
拷贝到你希望下载 Istio 的目录,并执行 - 说明:根据社区提供的安装脚本修改而来
.\getLatestIstio.ps1
istioctl manifest apply --set profile=demo
kubectl get pods -n istio-system
default
名空间开启自动 sidecar 注入kubectl label namespace default istio-injection=enabled
kubectl get namespace -L istio-injection
请参考 https://istio.io/docs/examples/bookinfo/
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
查看示例应用资源
kubectl get svc,pod
确认示例应用在运行中
kubectl exec -it $(kubectl get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}') -c ratings -- curl productpage:9080/productpage | grep -o "<title>.*</title>"
创建 Ingress Gateway
kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
查看 Gateway 配置
kubectl get gateway
确认示例应用可以访问
export GATEWAY_URL=localhost:80
curl -s http://${GATEWAY_URL}/productpage | grep -o "<title>.*</title>"
可以通过浏览器访问
samples/bookinfo/platform/kube/cleanup.sh
istioctl manifest generate --set profile=demo | kubectl delete -f -