Windows下Docker搭建Flink集群

编写docker-compose.yml

参照:https://github.com/docker-flink/examples/blob/master/docker-compose.yml

bash 复制代码
version: "2.1"
services:
  jobmanager:
    image: flink:1.14.4-scala_2.11
    expose:
      - "6123"
    ports:
      - "18081:8081"
    command: jobmanager
    environment:
      - JOB_MANAGER_RPC_ADDRESS=jobmanager

  taskmanager:
    image: flink:1.14.4-scala_2.11
    expose:
      - "6121"
      - "6122"
    depends_on:
      - jobmanager
    command: taskmanager
    links:
      - "jobmanager:jobmanager"
    environment:
      - JOB_MANAGER_RPC_ADDRESS=jobmanager
    scale: 2 #指定TaskManager的数量

在docker-compose.yml所有目录执行以下命令:

bash 复制代码
docker-compose up -d

执行过程:

[+] Running 14/14

✔ taskmanager 12 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 129.9s

✔ e756f3fdd6a3 Pull complete 17.7s

✔ bf168a674899 Pull complete 8.6s

✔ e604223835cc Pull complete 19.0s

✔ b879d05afe7d Pull complete 17.7s

✔ a54258f91250 Pull complete 20.7s

✔ c395a90ab0cf Pull complete 30.3s

✔ b79b6485357a Pull complete 22.8s

✔ 7a587b6ad6b3 Pull complete 28.5s

✔ 9021ca31d420 Pull complete 26.8s

✔ b215a7eba672 Pull complete 32.2s

✔ de1d611fa80f Pull complete 107.8s

✔ 9354c4dc24c1 Pull complete 35.4s

✔ jobmanager Pulled 129.9s

[+] Running 3/4

  • Network flinkdata_default Created 1.5s

✔ Container flinkdata-jobmanager-1 Started 0.8s

✔ Container flinkdata-taskmanager-2 Started 1.2s

✔ Container flinkdata-taskmanager-1 Started 0.8s

控制台查看:

相关推荐
景天科技苑1 小时前
【云原生开发】K8S多集群资源管理平台架构设计
云原生·容器·kubernetes·k8s·云原生开发·k8s管理系统
Jtti1 小时前
Windows系统服务器怎么设置远程连接?详细步骤
运维·服务器·windows
小奥超人2 小时前
PPT文件设置了修改权限,如何取消权?
windows·经验分享·microsoft·ppt·办公技巧
wclass-zhengge2 小时前
K8S篇(基本介绍)
云原生·容器·kubernetes
颜淡慕潇2 小时前
【K8S问题系列 |1 】Kubernetes 中 NodePort 类型的 Service 无法访问【已解决】
后端·云原生·容器·kubernetes·问题解决
川石课堂软件测试4 小时前
性能测试|docker容器下搭建JMeter+Grafana+Influxdb监控可视化平台
运维·javascript·深度学习·jmeter·docker·容器·grafana
W Y4 小时前
【架构-37】Spark和Flink
架构·flink·spark
ycsdn104 小时前
Caused by: org.apache.flink.api.common.io.ParseException: Row too short:
大数据·flink
昌sit!10 小时前
K8S node节点没有相应的pod镜像运行故障处理办法
云原生·容器·kubernetes
追风林11 小时前
mac 本地docker-mysql主从复制部署
mysql·macos·docker