dongjoon-hyun commented on a change in pull request #32874:
URL: https://github.com/apache/spark/pull/32874#discussion_r651316233
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientApplication.scala
##########
@@ -136,7 +136,15 @@ private[spark] class Client(
val driverPodName = resolvedDriverPod.getMetadata.getName
var watch: Watch = null
- val createdDriverPod = kubernetesClient.pods().create(resolvedDriverPod)
+ var createdDriverPod: Pod = null
+ try {
+ createdDriverPod = kubernetesClient.pods().create(resolvedDriverPod)
+ } catch {
+ case NonFatal(e) =>
+ logError("Fail to create driver pod, you may use wrong master URL or
permission denied." +
+ "please check the network connection and permission.")
Review comment:
Since we have enough information about the error itself, can we improve
the directional information more? For example, we can ask the users to check
`kubectl auth can-i create pod` first. It should be `yes`.
```
Exception in thread "main"
io.fabric8.kubernetes.client.KubernetesClientException: Operation: [create] for
kind: [Pod] with name: [null] in namespace: [default] failed.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]