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

相关推荐
小钱c75 小时前
Mac下安装Apache JMeter并启动
jmeter·macos·apache
景天科技苑6 小时前
【云原生开发】K8S多集群资源管理平台架构设计
云原生·容器·kubernetes·k8s·云原生开发·k8s管理系统
wclass-zhengge6 小时前
K8S篇(基本介绍)
云原生·容器·kubernetes
颜淡慕潇6 小时前
【K8S问题系列 |1 】Kubernetes 中 NodePort 类型的 Service 无法访问【已解决】
后端·云原生·容器·kubernetes·问题解决
川石课堂软件测试8 小时前
性能测试|docker容器下搭建JMeter+Grafana+Influxdb监控可视化平台
运维·javascript·深度学习·jmeter·docker·容器·grafana
昌sit!14 小时前
K8S node节点没有相应的pod镜像运行故障处理办法
云原生·容器·kubernetes
A ?Charis17 小时前
Gitlab-runner running on Kubernetes - hostAliases
容器·kubernetes·gitlab
wclass-zhengge17 小时前
Docker篇(Docker Compose)
运维·docker·容器
北漂IT民工_程序员_ZG18 小时前
k8s集群安装(minikube)
云原生·容器·kubernetes
梦魇梦狸º21 小时前
腾讯轻量云服务器docker拉取不到镜像的问题:拉取超时
docker·容器·github