Kubernetes集群上的Apache Ignite第4部分:部署介绍

以前,我们看到了Kubernetes安装随附的Ignite配置。
默认配置未启用持久性,因此我们将不关注helm图表提供的任何存储类。

默认安装使用有状态集。 您可以在Kubernetes 文档中找到有关状态集的更多信息。

 > kubectl get statefulset ignite-cache -o yaml  apiVersion: apps /v1  kind: StatefulSet  metadata: 
   creationTimestamp: 2020-04-09T12:29:04Z 
   generation: 1 
   labels: 
     app.kubernetes.io /instance : ignite-cache 
     app.kubernetes.io /managed-by : Helm 
     app.kubernetes.io /name : ignite 
     helm.sh /chart : ignite-1.0.1 
   name: ignite-cache 
   namespace: default 
   resourceVersion: "281390" 
   selfLink: /apis/apps/v1/namespaces/default/statefulsets/ignite-cache 
   uid: fcaa7bef-84cd-4e7c-aa33-a4312a1d47a9  spec: 
   podManagementPolicy: OrderedReady 
   replicas: 2 
   revisionHistoryLimit: 10 
   selector: 
     matchLabels: 
       app: ignite-cache 
   serviceName: ignite-cache 
   template: 
     metadata: 
       creationTimestamp: null 
       labels: 
         app: ignite-cache 
     spec: 
       containers: 
       - env : 
         - name: IGNITE_QUIET 
           value: "false" 
         - name: JVM_OPTS 
           value: -Djava.net.preferIPv4Stack= true 
         - name: OPTION_LIBS 
           value: ignite-kubernetes,ignite-rest-http 
         image: apacheignite /ignite :2.7.6 
         imagePullPolicy: IfNotPresent 
         name: ignite 
         ports: 
         - containerPort: 11211 
           protocol: TCP 
         - containerPort: 47100 
           protocol: TCP 
         - containerPort: 47500 
           protocol: TCP 
         - containerPort: 49112 
           protocol: TCP 
         - containerPort: 10800 
           protocol: TCP 
         - containerPort: 8080 
           protocol: TCP 
         - containerPort: 10900 
           protocol: TCP 
         resources: {} 
         terminationMessagePath: /dev/termination-log 
         terminationMessagePolicy: File 
         volumeMounts: 
         - mountPath: /opt/ignite/apache-ignite/config 
           name: config-volume 
       dnsPolicy: ClusterFirst 
       restartPolicy: Always 
       schedulerName: default-scheduler 
       securityContext: {} 
       serviceAccount: ignite-cache 
       serviceAccountName: ignite-cache 
       terminationGracePeriodSeconds: 30 
       volumes: 
       - configMap: 
           defaultMode: 420 
           items: 
           - key: ignite-config.xml 
             path: default-config.xml 
           name: ignite-cache-configmap 
         name: config-volume 
   updateStrategy: 
     rollingUpdate: 
       partition: 0 
     type : RollingUpdate  status: 
   replicas: 0 

如您所见,Ingite配置已通过configmap挂载。 您还可以看到此窗格将使用特定的服务帐户。
通过环境变量,启用了某些库,这些库在Ignite群集上提供了更多功能。 还指定了通信所需的端口和各种协议。

最后一步是服务。 所有点火节点均应是Kubernetes服务背后的负载均衡器。

 > kubectl get svc ignite-cache -o yaml  apiVersion: v1  kind: Service  metadata: 
   creationTimestamp: 2020-04-09T12:29:04Z 
   labels: 
     app: ignite-cache 
   name: ignite-cache 
   namespace: default 
   resourceVersion: "281389" 
   selfLink: /api/v1/namespaces/default/services/ignite-cache 
   uid: 5be68e28-a57c-4cb5-b610-b708bff80da7  spec: 
   clusterIP: None 
   ports: 
   - name: jdbc 
     port: 11211 
     protocol: TCP 
     targetPort: 11211 
   - name: spi-communication 
     port: 47100 
     protocol: TCP 
     targetPort: 47100 
   - name: spi-discovery 
     port: 47500 
     protocol: TCP 
     targetPort: 47500 
   - name: jmx 
     port: 49112 
     protocol: TCP 
     targetPort: 49112 
   - name: sql 
     port: 10800 
     protocol: TCP 
     targetPort: 10800 
   - name: rest 
     port: 8080 
     protocol: TCP 
     targetPort: 8080 
   - name: thin-clients 
     port: 10900 
     protocol: TCP 
     targetPort: 10900 
   selector: 
     app: ignite-cache 
   sessionAffinity: None 
   type : ClusterIP  status: 
   loadBalancer: {} 

无论是添加新节点还是添加点燃客户端节点,都将通过此Kubernetes服务访问点燃群集。 除此之外,您还可以基于Kubernetes服务将该缓存设为公共缓存或内部缓存。

翻译自: https://www.javacodegeeks.com/2020/04/apache-ignite-on-your-kubernetes-cluster-part-4-deployment-explained.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值