diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala index c933de796cf..214dd9b533c 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala @@ -176,7 +176,7 @@ class SparkProcessBuilder( // For spark on kubernetes, spark pod using env SPARK_USER_NAME as current user def setSparkUserName(userName: String, buffer: ArrayBuffer[String]): Unit = { clusterManager().foreach(cm => { - if (cm.startsWith("k8s://")) { + if (cm.toUpperCase.startsWith("K8S")) { buffer += CONF buffer += s"spark.kubernetes.driverEnv.SPARK_USER_NAME=$userName" buffer += CONF