Change flink job pods names

1/13/2022

I am using Ververica platform, community edition and I am trying to configure the pods' names. At the moment they look something like that:

job-1599c2bd-77b0-4f39-8fd9-029548079d31-jobmanager--1-lkk6v
job-1599c2bd-77b0-4f39-8fd9-029548079d31-taskmanager-5656db5kph
job-1599c2bd-77b0-4f39-8fd9-029548079d31-taskmanager-5656dd6988

I would like to have something like that

job-top-speed-windowing-jobmanager-1
job-top-speed-windowing-taskmanager-1
job-top-speed-windowing-taskmanager-2

I played around with what is specified in the documentation and this is an example of the yaml file I have tried last:

apiVersion: v1
kind: Deployment
metadata:
  annotations:
    com.dataartisans.appmanager.controller.deployment.spec.version: '265'
    com.dataartisans.appmanager.controller.deployment.transitioning: 'true'
    com.dataartisans.appmanager.controller.deployment.transitioning.since: '1642104082812'
  createdAt: '2022-01-13T20:01:05.410547Z'
  displayName: TopSpeedWindowing
  id: b495303e-5df6-4a65-9b24-7345da225979
  labels: {}
  modifiedAt: '2022-01-13T20:01:22.812754Z'
  name: top-speed-windowing
  namespace: default
  resourceVersion: 16
spec:
  deploymentTargetName: LoggingTest
  maxJobCreationAttempts: 4
  maxSavepointCreationAttempts: 4
  restoreStrategy:
    allowNonRestoredState: false
    kind: LATEST_STATE
  state: RUNNING
  template:
    metadata:
      annotations:
        flink.queryable-state.enabled: 'false'
        flink.security.ssl.enabled: 'false'
    spec:
      artifact:
        flinkImageRegistry: registry.ververica.com/v2.6
        flinkImageRepository: flink
        flinkImageTag: 1.14.2-stream1-scala_2.12-java8
        flinkVersion: '1.14'
        jarUri: >-
          https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.14.2/flink-examples-streaming_2.12-1.14.2-TopSpeedWindowing.jar
        kind: JAR
      flinkConfiguration:
        execution.checkpointing.externalized-checkpoint-retention: RETAIN_ON_CANCELLATION
        execution.checkpointing.interval: 10s
        execution.checkpointing.min-pause: 10s
        high-availability: vvp-kubernetes
        metrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter
        state.backend: filesystem
        taskmanager.memory.managed.fraction: '0.0'
      logging:
        log4j2ConfigurationTemplate: >-
          <?xml version="1.0" encoding="UTF-8" standalone="no"?> <Configuration
          xmlns="http://logging.apache.org/log4j/2.0/config" strict="true"> 
              <Appenders> 
                  <Appender name="StdOut" type="Console"> 
                      <Layout pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n" type="PatternLayout"/> 
                  </Appender> 
                  <Appender name="RollingFile" type="RollingFile" fileName="${sys:log.file}" filePattern="${sys:log.file}-%d{yyyy-MM-dd}.log">
                      <Layout pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n" type="PatternLayout"/> 
                      <Policies>
                          <TimeBasedTriggeringPolicy interval="6" modulate="true"/> 
                          <SizeBasedTriggeringPolicy size="100 MB"/> 
                      </Policies> 
                      <DefaultRolloverStrategy max="2"/> 
                  </Appender> 
              </Appenders> 
              <Loggers> 
                  <Logger level="INFO" name="org.apache.hadoop"/> 
                  <Logger level="INFO" name="org.apache.kafka"/> 
                  <Logger level="INFO" name="org.apache.zookeeper"/> 
                  <Logger level="INFO" name="akka"/> 
                  <Logger level="ERROR" name="org.jboss.netty.channel.DefaultChannelPipeline"/> 
                  <Logger level="OFF" name="org.apache.flink.runtime.rest.handler.job.JobDetailsHandler"/> 
                  {%- for name, level in userConfiguredLoggers -%} 
                  <Logger level="{{ level }}" name="{{ name }}"/> 
                  {%- endfor -%} 
                  <Root level="{{ rootLoggerLogLevel }}"> 
                      <AppenderRef ref="StdOut"/> 
                      <AppenderRef ref="RollingFile"/>
                  </Root> 
              </Loggers> 
          </Configuration>
        log4jLoggers:
          '': INFO
      parallelism: 2
      resources:
        jobmanager:
          cpu: 1
          memory: 1G
        taskmanager:
          cpu: 1
          memory: 2G
  upgradeStrategy:
    kind: STATEFUL

Is that possible?

-- Monika X
apache-flink
kubernetes

0 Answers