1.在Windows上安装 k3s
什么是k3d?
k3d 是一个轻量级包装器,用于在 docker 中运行k3s(Rancher Lab 的最小 Kubernetes 发行版)。
参考: 小子宝丁《 使用 k3d 在Windows上安装 k3s 》 2022-08-16
文件下载:
kubectl-v1.27.2.exe (2023.05.25最新,通过修改参考文档地址到官网新版测试得到)
k3d-v5.5.1.exe
a.安装配置
docker已安装最新版。把2个文件改名去后缀放到D:\bin
目录下,并配置环境变量。
- 测试启动
k3d
k3d cluster create k3s-server --api-port 6443 --port 0.0.0.0:8099:80@loadbalancer --servers 1 --agents 2
日志
PS D:\bin> k3d cluster delete k3s-server
INFO[0002] Deleting cluster 'k3s-server'
INFO[0013] Deleting cluster network 'k3d-k3s-server'
INFO[0013] Deleting 1 attached volumes...
INFO[0013] Removing cluster details from default kubeconfig...
INFO[0013] Removing standalone kubeconfig file (if there is one)...
INFO[0013] Successfully deleted cluster k3s-server!
PS D:\bin> k3d cluster create k3s-server --api-port 6443 --port 0.0.0.0:8099:80@loadbalancer --servers 1 --agents 2
INFO[0000] portmapping '0.0.0.0:8099:80' targets the loadbalancer: defaulting to [servers:*:proxy agents:*:proxy]
INFO[0000] Prep: Network
INFO[0000] Created network 'k3d-k3s-server'
INFO[0000] Created image volume k3d-k3s-server-images
INFO[0000] Starting new tools node...
INFO[0000] Starting Node 'k3d-k3s-server-tools'
INFO[0001] Creating node 'k3d-k3s-server-server-0'
INFO[0001] Creating node 'k3d-k3s-server-agent-0'
INFO[0002] Creating node 'k3d-k3s-server-agent-1'
INFO[0002] Creating LoadBalancer 'k3d-k3s-server-serverlb'
INFO[0002] Using the k3d-tools node to gather environment information
INFO[0004] Starting new tools node...
INFO[0004] Starting Node 'k3d-k3s-server-tools'
INFO[0006] Starting cluster 'k3s-server'
INFO[0006] Starting servers...
INFO[0006] Starting Node 'k3d-k3s-server-server-0'
INFO[0015] Starting agents...
INFO[0015] Starting Node 'k3d-k3s-server-agent-1'
INFO[0015] Starting Node 'k3d-k3s-server-agent-0'
INFO[0020] Starting helpers...
INFO[0021] Starting Node 'k3d-k3s-server-serverlb'
INFO[0029] Injecting records for hostAliases (incl. host.k3d.internal) and for 5 network members into CoreDNS configmap...
INFO[0032] Cluster 'k3s-server' created successfully!
INFO[0033] You can now use it like this:
kubectl cluster-info
PS D:\bin> kubectl cluster-info
Kubernetes control plane is running at https://host.docker.internal:6443
CoreDNS is running at https://host.docker.internal:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://host.docker.internal:6443/api/v1/namespaces/kube-system/services/https:metrics-server:https/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
- 其中注意
hosts
配置
# Added by Docker Desktop
127.0.0.1 host.k3d.internal
192.168.8.120 host.docker.internal
192.168.8.120 gateway.docker.internal
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section
这几个 *.internal
域名对应IP都是本机,可以正常访问。
c. 其它
k3d官方文档 https://k3d.io/v5.5.1/usage/commands/k3d_cluster/
k3d cluster delete k3s-server
配置文件 https://k3d.io/v5.5.1/usage/configfile/
https://docs.k3s.io/zh/installation/kube-dashboard
2. TDengine 连接
C:\TDengine>taos -V
version: 3.0.4.1
版本(Client Version:3.0.4.1)
scoop install java/corretto17-jdk
scoop install main/maven
git clone https://github.com/taosdata/taos-connector-jdbc.git
cd taos-connector-jdbc
mvn clean install -D maven.test.skip=true
安装后编译驱动,taos-connector-jdbc: https://github.com/taosdata/taos-connector-jdbc/blob/main/README-CN.md
a. Dbeaver连接
TDengine 入门教程⑧——数据库管理工具 | DBeaver 连接 TDengine 已测,一次成功。com.taosdata.jdbc.rs.RestfulDriver
jdbc:TAOS-RS://localhost:6041/test
操作过程:菜单数据库
->驱动管理器
->新建
b. idea编辑器连接
如果编辑器右上角未出现数据库,到设置
->插件
->插件市场
搜索database下载。
首先使用的是idea连接:驱动选择的都是 target/taos-jdbcdriver-3.2.1-dist.jar
,奈何不成:连接一直转圈而不报错。后来选择 rs.RestfulDriver
+ jdbc:TAOS-RS://localhost:6041/test
测试连接成功。
参考《 如何使用 IDEA 数据库工具连接 TDengine 》
其实查看服务
原生连接方式的适配器已存在了,暂没有找到这种连接方法。
3. opengauss安装
- 准备服务器环境:在应用商店搜索
openeuler
,安装新版。
轻量版 安装openGauss
4. KubeEdge安装
5. k8s安装
开启k8s
https://github.com/istio/istio/releases 下拉更多,下载istio-1.17.2-win.zip
。
- kubernetes仪表盘
在 https://github.com/kubernetes/dashboard
下载仪表盘配置文件
https://ghproxy.com/https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
kubectl apply -f kubernetes-dashboard.yaml
kubectl get pod -n kubernetes-dashboard
尝试登录
docker login
kubectl describe pod -n kubernetes-dashboard dashboard-metrics-scraper-64bcc67c9c-qndqs
- 设置代理
{ "registry-mirrors": [ "https://dockerproxy.com" ] }
kubectl delete -f kubernetes-dashboard.yaml
其它参考:《 第五篇:kubernetes部署dashboard(图形化界面) 》
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。