使用k8s 進行 streamsets的部署(沒有使用持久化存儲)node
deploy.yamlapi
apiVersion: extensions/v1beta1 kind: Deployment metadata: name: streamsets namespace: big-data labels: app: streamsets spec: replicas: 1 template: metadata: labels: app: streamsets spec: containers: - name: streamsets image: streamsets/datacollector imagePullPolicy: IfNotPresent ports: - containerPort: 18630 - containerPort: 8000 --- apiVersion: v1 kind: Service metadata: name: streamsets namespace: big-data spec: selector: app: streamsets ports: - name: http-ui port: 18630 protocol: TCP - name: http-server port: 8000 protocol: TCP type: NodePort --- apiVersion: extensions/v1beta1 kind: Ingress metadata: name: streamsets namespace: big-data spec: rules: - host: s.data.com http: paths: - backend: serviceName: streamsets servicePort: 18630 path: /
上邊部署文件使用deploy 進行streamsets 部署,同時暴露了一個http serevr 端口(測試 microservice pipeline)
同時添加了k8s ingress 訪問,以及一個service (nodeport 類型),namespace big-dataapp
kubectl apply -f deploy.yaml