Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kubernetes kubectl-来自守护程序的错误响应:创建装载源路径时出错_Kubernetes_Google Cloud Platform_Google Kubernetes Engine_Hana - Fatal编程技术网

Kubernetes kubectl-来自守护程序的错误响应:创建装载源路径时出错

Kubernetes kubectl-来自守护程序的错误响应:创建装载源路径时出错,kubernetes,google-cloud-platform,google-kubernetes-engine,hana,Kubernetes,Google Cloud Platform,Google Kubernetes Engine,Hana,我正试图按照指南在谷歌云平台的Kubernete节点中安装SAP HANA Express docker image,但是,在执行步骤7“部署容器并连接到它们”期间,我没有得到预期的结果 我正在执行命令kubectl create-f hxe.yaml,下面是我正在使用的yaml文件: kind: ConfigMap apiVersion: v1 metadata: creationTimestamp: 2018-01-18T19:14:38Z name: hxe-pass data:

我正试图按照指南在谷歌云平台的Kubernete节点中安装SAP HANA Express docker image,但是,在执行步骤7“部署容器并连接到它们”期间,我没有得到预期的结果

我正在执行命令
kubectl create-f hxe.yaml
,下面是我正在使用的yaml文件:

kind: ConfigMap
apiVersion: v1
metadata:
  creationTimestamp: 2018-01-18T19:14:38Z
  name: hxe-pass
data:
  password.json: |+
    {"master_password" : "HXEHana1"}
---
kind: PersistentVolume
apiVersion: v1
metadata:
  name: persistent-vol-hxe
  labels:
    type: local
spec:
  storageClassName: manual
  capacity:
    storage: 150Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/data/hxe_pv"
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: hxe-pvc
spec:
  storageClassName: manual
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 50Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: hxe
  labels:
    name: hxe
spec:
  selector:
    matchLabels:
      run: hxe
      app: hxe
      role: master
      tier: backend
  replicas: 1
  template:
    metadata:
      labels:
        run: hxe
        app: hxe
        role: master
        tier: backend
    spec:
      initContainers:
        - name: install
          image: busybox
          command: [ 'sh', '-c', 'chown 12000:79 /hana/mounts' ]
          volumeMounts:
            - name: hxe-data
              mountPath: /hana/mounts
      volumes:
        - name: hxe-data
          persistentVolumeClaim:
             claimName: hxe-pvc
        - name: hxe-config
          configMap:
             name: hxe-pass
      imagePullSecrets:
      - name: docker-secret
      containers:
      - name: hxe-container
        image: "store/saplabs/hanaexpress:2.00.045.00.20200121.1"
        ports:
          - containerPort: 39013
            name: port1
          - containerPort: 39015
            name: port2
          - containerPort: 39017
            name: port3
          - containerPort: 8090
            name: port4
          - containerPort: 39041
            name: port5
          - containerPort: 59013
            name: port6
        args: [ "--agree-to-sap-license", "--dont-check-system", "--passwords-url", "file:///hana/hxeconfig/password.json" ]
        volumeMounts:
          - name: hxe-data
            mountPath: /hana/mounts
          - name: hxe-config
            mountPath: /hana/hxeconfig
      - name: sqlpad-container
        image: "sqlpad/sqlpad"
        ports:
        - containerPort: 3000

---
apiVersion: v1
kind: Service
metadata:
  name: hxe-connect
  labels:
    app: hxe
spec:
  type: LoadBalancer
  ports:
  - port: 39013
    targetPort: 39013
    name: port1
  - port: 39015
    targetPort: 39015
    name: port2
  - port: 39017
    targetPort: 39017
    name: port3
  - port: 39041
    targetPort: 39041
    name: port5
  selector:
    app: hxe
---
apiVersion: v1
kind: Service
metadata:
  name: sqlpad
  labels:
    app: hxe
spec:
  type: LoadBalancer
  ports:
  - port: 3000
    targetPort: 3000
    protocol: TCP
    name: sqlpad
  selector:
    app: hxe
我还使用了HANA Express Edition docker image的最新版本:
store/saplabs/hanaexpress:2.00.045.00.20200121.1
,您可以在这里看到:

我得到的错误如下:

有没有想过会有什么问题


向大家致意,祝大家新年快乐。

多亏了Mahboob的建议,我现在可以启动pods(部分启动),问题不会在“busybox”容器启动阶段出现。问题是,我在为节点池使用容器优化的映像,所需的映像是Ubuntu。如果您面临类似的问题,请仔细检查您在创建节点池时选择的图像样式

然而,我现在有一个不同的问题,pod正在启动(HANAX和另一个用于sqlpad),然而其中一个,sqlpad容器,在启动后的某个点崩溃,pod被卡在CrashLoopBackOff状态。如下图所示,吊舱处于CrashLoopBackOff状态,只有1/2启动,突然两者都在运行

我并没有找到解决这个问题的正确地点,因为我是kubernetes和docker世界的新手。希望你们中的一些人能给我带来一些光明


问候。

类似问题您好Mahboob,谢谢您的建议。它帮助我解决了我的主要障碍,即节点池映像正在进行容器优化。我将此图像切换到Ubuntu,现在它至少启动了容器并安装了播客。您通常不应该使用
hostPath:
volumes,尤其是在托管云环境中。能否删除
PersistentVolumeClaim
中的显式
PersistentVolumeClaim
storageClassName:
?GKE应该自动为您提供一个持久卷。欢迎使用stackoverflow。请将程序输出或错误消息等文本复制并粘贴到帖子中(作为块引号),而不是提供像素光栅格式副本:注意,如果原始问题的问题已经解决,请留下您的答案,并使用新问题描述创建新帖子。