influxdb2.0-k8s部署


安装

kubectl apply -f https://raw.githubusercontent.com/influxdata/docs-v2/master/static/downloads/influxdb-k8-minikube.yaml
kubectl get pods -n influxdb
kubectl describe service -n influxdb influxdb
kubectl port-forward -n influxdb service/influxdb 9999:9999

yaml

---
apiVersion: v1
kind: Namespace
metadata:
    name: influxdb
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
    labels:
        app: influxdb
    name: influxdb
    namespace: influxdb
spec:
    replicas: 1
    selector:
        matchLabels:
            app: influxdb
    serviceName: influxdb
    template:
        metadata:
            labels:
                app: influxdb
        spec:
            containers:
              - image: quay.io/influxdb/influxdb:2.0.0-beta
                name: influxdb
                ports:
                  - containerPort: 9999
                    name: influxdb
                volumeMounts:
                  - mountPath: /root/.influxdbv2
                    name: data
    volumeClaimTemplates:
      - metadata:
            name: data
            namespace: influxdb
        spec:
            accessModes:
              - ReadWriteOnce
            resources:
                requests:
                    storage: 10G
---
apiVersion: v1
kind: Service
metadata:
    name: influxdb
    namespace: influxdb
spec:
    ports:
      - name: influxdb
        port: 9999
        targetPort: 9999
    selector:
        app: influxdb
    type: ClusterIP

文章作者: wuzhiyong
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 wuzhiyong !
评论
 上一篇
Serverless简介 Serverless简介
什么是serverless?简单的定义Serverless(无服务器架构)指的是服务端逻辑由开发者实现,运行在无状态的计算容器中,由事件触发,完全被第三方管理,而业务层面的状态则记录在数据库或存储资源中。 进阶的定义Serverless是由
2020-02-27
下一篇 
influxdb2.0-docker部署 influxdb2.0-docker部署
docker run --name influxdb -p 9999:9999 quay.io/influxdb/influxdb:2.0.0-betadocker run -p 9999:9999 quay.io/influxdb/inf
2020-02-25
  目录