apache / incubator-streampark

Make stream processing easier! Easy-to-use streaming application development framework and operation platform.
https://streampark.apache.org/
Apache License 2.0
3.84k stars 990 forks source link

Kube Conf File setting of kubernetes session is invalid #1909

Open huangkaiyan10 opened 1 year ago

huangkaiyan10 commented 1 year ago

Search before asking

What happened

at setting page ,i new add a flink cluster of kubernetes session and setting Kube Conf File value is /etc/kubernetes/admin.conf. and start cluster but exception. 03fde7120b04029f95e34bc485cdff9

c29dda25287383215a7d3f10c21f3f7

image

StreamPark Version

1.2.3

Java Version

jdk8

Flink Version

1.14.5-2.12

Scala Version of Flink

2.12

Error Exception

Caused by: java.nio.file.NoSuchFileException: /etc/kubernetes/admin.conf 
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
    at java.nio.file.Files.newByteChannel(Files.java:361)
    at java.nio.file.Files.newByteChannel(Files.java:407)
    at org.apache.flink.util.FileUtils.readAllBytes(FileUtils.java:171)
    at org.apache.flink.util.FileUtils.readFile(FileUtils.java:137)
    at org.apache.flink.util.FileUtils.readFileUtf8(FileUtils.java:142)
    at org.apache.flink.kubernetes.kubeclient.FlinkKubeClientFactory.fromConfiguration(FlinkKubeClientFactory.java:80)
    ... 22 more

Screenshots

c29dda25287383215a7d3f10c21f3f7

Are you willing to submit PR?

Code of Conduct

huangkaiyan10 commented 1 year ago

I solve the problem in this way. cp -rf /etc/kubernetes/admin.conf /root/.kube/config