k8s上部署单节点apache-lotdb

一、yaml文件

使用的nfs的动态存储类,需要提前搭建。

复制代码
# cat iotdb_deployment.yaml 
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: logs
  namespace: lotdb
spec:
  storageClassName: "nfs-client"
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 5Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: data
  namespace: lotdb
spec:
  storageClassName: "nfs-client"
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 10Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: lotdb
  namespace: lotdb
spec:
  replicas: 1
  selector:
    matchLabels:
      app: lotdb
  template:
    metadata:
      labels:
        app: lotdb
    spec:
      containers:
      - name: lotdb
        image: apache/iotdb:1.3.0-standalone
        ports:
        - containerPort: 6667
        volumeMounts:
        - name: logs
          mountPath: /iotdb/logs
        - name: data
          mountPath: /iotdb/data
        env:
        - name: cn_internal_address
          value: 0.0.0.0
        - name: cn_internal_port
          value: "10710" 
        - name: cn_consensus_port
          value: "10720"
        - name: cn_seed_config_node
          value: 0.0.0.0:10710
        - name: dn_rpc_address
          value: 0.0.0.0
        - name: dn_internal_address
          value: 0.0.0
        - name: dn_rpc_port
          value: "6667"
        - name: dn_mpp_data_exchange_port
          value: "10740"
        - name: dn_schema_region_consensus_port
          value: "10750"
        - name: dn_data_region_consensus_port
          value: "10760"
        - name: dn_seed_config_node
          value: "10710"
        livenessProbe:
          tcpSocket:
            port: 6667
          initialDelaySeconds: 40
          periodSeconds: 10
        readinessProbe:
          tcpSocket:
            port: 6667
          initialDelaySeconds: 40
          periodSeconds: 10
      volumes:
      - name: logs
        persistentVolumeClaim:
          claimName: logs
      - name: data
        persistentVolumeClaim:
          claimName: data
      dnsPolicy: "None"
      dnsConfig:
        nameservers:
          - 10.96.0.10
        searches:
          - svc.cluster.local
          - cluster.local
---
apiVersion: v1
kind: Service
metadata:
  name: lotdb
  namespace: lotdb
spec:
  clusterIP: 10.96.201.174
  clusterIPs:
  - 10.96.201.174
  externalTrafficPolicy: Cluster
  internalTrafficPolicy: Cluster
  ports:
  - nodePort: 30925
    port: 6667
    protocol: TCP
    targetPort: 6667
  selector:
    app: lotdb
  type: NodePort


# kubectl create ns lotdb

# kubectl apply -f iotdb_deployment.yaml

二、需要修改的地方

三、查看

docker tag dhub.kubesre.xyz/apache/iotdb:1.3.0-standalone apache/iotdb:1.3.0-standalone

docker rmi dhub.kubesre.xyz/apache/iotdb:1.3.0-standalone

相关推荐
fruge2 小时前
飞牛OS部署Flare导航页:Docker Compose、YAML书签配置与cpolar公网访问
运维·docker·容器
Zhou1411363 小时前
Docker_02_Dockerfile与存储网络
网络·docker·容器
bllovepigpig4 小时前
操作系统个人学习笔记(四):K8s基础
笔记·学习·kubernetes
键盘鼓手苏苏6 小时前
ESLint 规则渐进式升级:从 0 警告到全面开启的迁移策略(续篇)
云原生·kubernetes·k8
guo_wen_qiang6 小时前
云服务器elasticsearch环境搭建-单台
运维·elasticsearch·容器
江湖有缘8 小时前
Docker实战 | 使用Docker部署Bibliotheca阅读习惯管理工具
java·docker·容器
万联WANFLOW8 小时前
Docker Hub 镜像拉取慢、timeout 的排查方法
运维·docker·云原生·容器·eureka
AllData公司负责人8 小时前
AllData数据中台物联网实时平台|集成 Apache StreamPipes,MQTT工业物联网数据实时预警实践案例
大数据·数据库·人工智能·物联网·apache·工业物联网·streampipes
bloglin9999919 小时前
vmware部署centos7启动docker容器后无法访问服务
运维·docker·容器
weixin_4445793020 小时前
Containerd
容器·k8s