惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Schneier on Security
Schneier on Security
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
The GitHub Blog
The GitHub Blog
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
罗磊的独立博客
H
Help Net Security
博客园 - 聂微东
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
有赞技术团队
有赞技术团队
云风的 BLOG
云风的 BLOG
博客园 - 【当耐特】
G
GRAHAM CLULEY
S
Schneier on Security
A
About on SuperTechFans
MyScale Blog
MyScale Blog
Stack Overflow Blog
Stack Overflow Blog
T
The Exploit Database - CXSecurity.com
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Register - Security
The Register - Security
P
Proofpoint News Feed
Jina AI
Jina AI
Latest news
Latest news
T
Threat Research - Cisco Blogs
V
Visual Studio Blog
P
Privacy International News Feed
H
Hacker News: Front Page
Application and Cybersecurity Blog
Application and Cybersecurity Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threatpost
T
Tor Project blog
SecWiki News
SecWiki News
Google Online Security Blog
Google Online Security Blog
O
OpenAI News
T
Tenable Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More

博客园 - 山顶洞外人

wsl 磁盘 SQL 写法对比 关于达梦8管理工具执行多行sql语法错误问题 从C#接口的属性获取多个实现类中字段的值 idea 中无法连接 sql server 数据库,报错 [08S01] 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接 TransactionScope 图片扩容 已将此 订阅标记为不活动,必须将其重新初始化。需要删除NoSync 订阅,然后重新创建它们 visual studio 2017 将winform 打包成 msi 安装文件 漏洞处理 阿里云物联网测试 net core3.1 + electron 9.31.2 项目初始化 delete in 事故清表 sql 脚本执行时间 webapi filter 分组后条件查询 一行拆多行 有关数据库锁表 order by 排序的数字异常
k8s部署dengine-3.3.6.9
山顶洞外人 · 2026-03-27 · via 博客园 - 山顶洞外人

1.taosd-service.yaml

---
apiVersion: v1
kind: Service
metadata:
  name: "taosd-service"
  namespace: "dev-rd2"
  labels:
    app: "tdengine"
spec:
  ports:
  - name: tcp6030
    protocol: "TCP"
    port: 6030
  - name: tcp6041
    protocol: "TCP"
    port: 6041
  selector:
    app: "tdengine"

2.taosd-statefulset.yaml

---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: "tdengine"
  namespace: "dev-rd2"
  labels:
    app: "tdengine"
spec:
  serviceName: "taosd-service"
  replicas: 3
  updateStrategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: "tdengine"
  template:
    metadata:
      name: "tdengine"
      labels:
        app: "tdengine"
    spec:
      imagePullSecrets:
        - name: registry-shanghai3h-secret-netsimu
      containers:
        - name: "tdengine"
          image: "registry.abcd.com/rd-lib/tdengine/tdengine:3.3.6.9"
          imagePullPolicy: "IfNotPresent"
          #command: ["sh", "-c"]
          #args: ["sed -i '/^allowAllOrigins.*=.*true/a\\allowWebSockets = true' /etc/taos/taosadapter.toml && /tini -- /usr/bin/entrypoint.sh taosd "]
          ports:
            - name: tcp6030
              protocol: "TCP"
              containerPort: 6030
            - name: tcp6041
              protocol: "TCP"
              containerPort: 6041
          env:
            # POD_NAME for FQDN config
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            # SERVICE_NAME and NAMESPACE for fqdn resolve
            - name: SERVICE_NAME
              value: "taosd-service"
            - name: STS_NAME
              value: "tdengine"
            - name: STS_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            # TZ for timezone settings, we recommend to always set it.
            - name: TZ
              value: "Asia/Shanghai"
            # TAOS_ prefix will configured in taos.cfg, strip prefix and camelCase.
            - name: TAOS_SERVER_PORT
              value: "6030"
            # Must set if you want a cluster.
            - name: TAOS_FIRST_EP
              value: "$(STS_NAME)-0.$(SERVICE_NAME).$(STS_NAMESPACE).svc.cluster.local:$(TAOS_SERVER_PORT)"
            # TAOS_FQND should always be set in k8s env. 
            - name: TAOS_FQDN
              value: "$(POD_NAME).$(SERVICE_NAME).$(STS_NAMESPACE).svc.cluster.local"
            - name: TAOS_ADAPTER_CORS_ALLOW_ALL_ORIGINS
              value: "true"
            - name: TAOS_ADAPTER_CORS_ALLOW_WebSockets
              value: "true"
            # - name: TAOS_CHARSET
            #   value: "utf8mb4"
          volumeMounts:
            - name: taosdata
              mountPath: /var/lib/taos
          startupProbe:
            exec:
              command:
                - taos-check
            failureThreshold: 360
            periodSeconds: 10
          readinessProbe:
            exec:
              command:
                - taos-check
            initialDelaySeconds: 10
            timeoutSeconds: 30
          livenessProbe:
            exec:
              command:
                - taos-check
            initialDelaySeconds: 60
            timeoutSeconds: 30      #从默认值改为 30 秒
            periodSeconds: 20
            failureThreshold: 3
  volumeClaimTemplates:
    - metadata:
        name: taosdata
      spec:
        accessModes:
          - "ReadWriteOnce"
        storageClassName: "local"
        resources:
          requests:
            storage: "5Gi"

3.部署

kubectl apply -f taosd-service.yaml -n dev-rd2

kubectl apply -f taosd-statefulset.yaml -n dev-rd2

4.(1-3)是前期主备,当然k8s环境事先要准备好,当前使用的是Harbor用来管理镜像

5.主要的操作流程

>安装Harbor

>安装K8s

>安装Docker Desktop

>docker pull tdengine/tdengine:3.3.6.9 下载镜像

>docker save -o tdengine-3.3.6.9.tar tdengine/tdengine:3.3.6.9 

>docker push registry.abcd.com/rd-lib/tdengine/tdengine:3.3.6.9

>部署 kubectl apply -f taosd-service.yaml -n dev-rd2和kubectl apply -f taosd-statefulset.yaml -n dev-rd2

>K8sweb配置服务外部访问IP

image

>K8s修改配置

image

>K8s重建副本

>测试tdengine是否正常

image