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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & 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

posted @ 2026-03-27 17:25  山顶洞外人  阅读(6)  评论()    收藏  举报