GKE部署Paraview容器遇路径错误及服务访问异常求助
GKE部署Paraview容器故障排查求助
我方承包商已完成应用开发及Docker镜像构建,该容器可在Google虚拟机上通过以下命令正常运行,且能通过localhost:8080访问应用:
docker run --gpus all -p 8080:8080 imagename ./bin/pvpython share/paraview-5.9/web/visualizer/server/pvw-visualizer.py --content share/paraview-5.9/web/visualizer/www/ --port 8080 --plugins lib/paraview-5.9/plugins/StreamLinesRepresentation/StreamLinesRepresentation.so
现将该容器部署至Google Kubernetes Engine(GKE)时遇到以下问题:
- 自行编写Deployment YAML时,Pod日志提示配置中的路径(如
share/paraview-5.9/web/visualizer/server/pvw-visualizer.py)无法找到; - 使用Kompose将承包商提供的Docker Compose转换为Kubernetes YAML后,Pod无日志输出,通过LoadBalancer或ClusterIP类型的Service访问时,均显示“xxx.xxx.xxx.xxx未发送任何数据”,无法正常访问应用。
转换后的Deployment YAML:
apiVersion: apps/v1 kind: Deployment metadata: annotations: kompose.cmd: kompose convert kompose.version: 1.26.0 (40646f47) creationTimestamp: null labels: io.kompose.service: our app name: our app spec: replicas: 1 selector: matchLabels: io.kompose.service: our app strategy: type: Recreate template: metadata: annotations: kompose.cmd: kompose convert kompose.version: 1.26.0 (40646f47) creationTimestamp: null labels: io.kompose.service: our app spec: containers: - args: - ./bin/pvpython - share/paraview-5.9/web/visualizer/server/pvw-visualizer.py - --content - share/paraview-5.9/web/visualizer/www/ - --plugins - lib/paraview-5.9/plugins/StreamLinesRepresentation/StreamLinesRepresentation.so image: my image name name: our app ports: - containerPort: 8080 resources: limits: nvidia.com/gpu: "1"
转换后的Service YAML:
apiVersion: v1 kind: Service metadata: name: our service annotations: kompose.cmd: kompose convert kompose.version: 1.26.0 (40646f47) creationTimestamp: null labels: io.kompose.service: our service name: our app spec: type: LoadBalancer selector: app: our app io.kompose.service: our service ports: - protocol: TCP port: 8080 targetPort: 8080
请求协助排查上述问题,实现应用在GKE上的正常部署与访问。
内容的提问来源于stack exchange,提问作者CloudNewbie
相关产品推荐
相关产品推荐

