当前位置: 首页 > news >正文

Flink Operator 使用指南 之 全局配置

背景

在上一个章节中已经介绍了基本的Flink-Operator安装,但是在实际的数据中台的项目中,用户可能希望看到Flink Operator的运行日志情况,当然这可以通过修改Flink-Operator POD的文件实现卷挂载的形势将日志输出到宿主机器的指定目录下,但是这种办法对数据中台的产品不是特别友好,因此我们需要将Operator服务的日志输出到Kafka Appender中;因此我们需要修改Flink Operator的helm中的values配置文件文件,达成我们的目标.

默认情况下Flink Operator不支持Kafka Appender日志输出,为了支持改能力,需要在flink-operator的镜像编译的时候添加kafka依赖,这里小编是在flink-kubernetes-operator模块的pom.xml文件中添加如下配置

<!--kafka版本信息-->
<properties><kafka-clients.version>2.2.0</kafka-clients.version>
</properties>
...
<!--kafka clients依赖-->
<dependency><groupId>org.apache.kafka</groupId><artifactId>kafka-clients</artifactId><version>${kafka-clients.version}</version>
</dependency>

然后对flink-operator重新进行打包编译,重新发布flink-kubernetes-operator镜像即可

日志采集

可以这么理解flink-operator服务是一个flink 任务提交的客户端,在设计的时候会在提交作业的时候允许用户覆盖log4j-console.propertieslog4j-operator.properties配置文件,其中如果用户需要采集k8s作业容器的运行日志可以尝试配置log4j-console.properties配置文件,如果是希望查看flink-operator服务本身的日志需要覆盖log4j-operator.properties配置文件。

################################################################################
#  Licensed to the Apache Software Foundation (ASF) under one
#  or more contributor license agreements.  See the NOTICE file
#  distributed with this work for additional information
#  regarding copyright ownership.  The ASF licenses this file
#  to you under the Apache License, Version 2.0 (the
#  "License"); you may not use this file except in compliance
#  with the License.  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
# limitations under the License.
################################################################################---# List of kubernetes namespaces to watch for FlinkDeployment changes, empty means all namespaces.
# When enabled RBAC is only created for said namespaces, otherwise it is done for the cluster scope.
# watchNamespaces: ["flink"]image:repository: ghcr.io/apache/flink-kubernetes-operatorpullPolicy: IfNotPresenttag: "51eeae1"# If image digest is set then it takes precedence and the image tag will be ignored# digest: ""imagePullSecrets: []# Replicas must be 1 unless operator leader election is configured
replicas: 1# Strategy type must be Recreate unless leader election is configured
strategy:type: Recreaterbac:create: true# kubernetes.rest-service.exposed.type: NodePort requires# list permission for nodes at the cluster scope.# Set create to true if you are using NodePort type.nodesRule:create: falseoperatorRole:create: truename: "flink-operator"operatorRoleBinding:create: truename: "flink-operator-role-binding"jobRole
http://www.lryc.cn/news/237807.html

相关文章:

  • 手把手教你通过CODESYS V3进行PLC编程(一)
  • 《算法通关村—进制转换问题处理模板》
  • python接口自动化测试之接口数据依赖
  • s28.CentOS、Ubuntu、Rocky Linux系统初始化脚本v6版本
  • go同步锁 sync mutex
  • 使用项目自动生成的dokcerfile第一次构建时把加载aps5.0失败无法找到加载的文件
  • ACREL DC energy meter Application in Indonesia
  • 报错!Jupyter notebook 500 : Internal Server Error
  • 2023.11.21使用<button>元素来触发form表单和数据提交
  • leetcode:504. 七进制数
  • centos安装指定版本docker
  • PPT幻灯片里的图片,批量提取
  • 《Fine-Grained Image Analysis with Deep Learning: A Survey》阅读笔记
  • 【网络安全】伪装IP网络攻击的识别方法
  • redis非关系型数据库
  • LeetCode 0053. 最大子数组和:DP 或 递归(线段树入门题?)
  • 二十三种设计模式全面解析-解密职责链模式:请求处理的设计艺术
  • 【linux】安装telnet
  • 深入探索 PaddlePaddle 中的计算图
  • 西南科技大学814考研一
  • 【网络编程】简述TCP通信程序,三次握手,四次挥手
  • 【ARM Trace32(劳特巴赫) 使用介绍 5 -- Trace32 ELF 文件加载介绍】
  • Linux(4):Linux文件与目录管理
  • Altium Designer学习笔记2
  • Atlassian发布最新补贴政策,Jira/Confluence迁移上云最低可至零成本
  • 基于FPGA的五子棋(论文+源码)
  • QT5 MSVC2017 64bit配置OpenCV4.5无需编译与示范程序
  • windows如何查看自己的ip地址
  • Camera2的使用【详细】
  • Playcanvas后处理-辉光bloom