Kubernetes에 JHipster 프로젝트를 배포 할 때 ""/ target "파일을 만드는 동안 오류가 발생했습니다."

마이크 K.

Jhipster (v5.5.0) 프로젝트를 Kubernetes (v1.16.3)에 배포하려고하는데 포드가 아래 로그와 함께 계속 실패합니다. 누구나 아이디어가 있습니까?

다음은 배포 / 포드를 생성 할 YAML입니다. PV와 PVC를 만드는 또 다른 YAML이 있습니다.

kind: Deployment
metadata:
  name: portal
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  template:
    spec:
      containers:
        - name: portal
          image: "portal"
          resources:
            limits:
              cpu: "0.5"
              memory: "2048Mi"
            requests:
              cpu: "0.1"
              memory: "64Mi"
          imagePullPolicy: IfNotPresent
          workingDir: /
          securityContext:
            runAsNonRoot: true
            runAsUser: 950
          ports:
            - containerPort: 8080
      imagePullSecrets:
        - name: regcred
      volumes:
        - name: portal-db-vol01
          persistentVolumeClaim:
            claimName: portal-db-pvc-volume01
      terminationGracePeriodSeconds: 15

다음은 내 로그입니다.


org.h2.jdbc.JdbcSQLException: Error while creating file "/target" [90062-196]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
        at org.h2.message.DbException.get(DbException.java:179)
        at org.h2.message.DbException.get(DbException.java:155)
        at org.h2.store.fs.FilePathDisk.createDirectory(FilePathDisk.java:274)
....

2020-02-05T21:59:14Z  WARN 7 - [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.RuntimeException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.netflix.zuul.ZuulConfiguration$ZuulFilterConfiguration': Unsatisfied dependency expressed through field 'filters'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'noCachePreFilter' defined in URL [jar:file:/app.war!/WEB-INF/classes!/com/odp/filters/pre/NoCachePreFilter.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appRepository': Cannot create inner bean '(inner bean)#248deced' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#248deced': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [com/odp/config/DatabaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.DatabaseException: org.h2.jdbc.JdbcSQLException: Error while creating file "/target" [90062-196]

BMW

portal포드 의 컨테이너 가 루트가 아닌 사용자로 실행 되기 때문에950

          securityContext:
            runAsNonRoot: true
            runAsUser: 950

이 사용자에게 root에 파일 / 폴더를 만들 수있는 권한이 있는지 확인하십시오 /. 일반적으로 루트 만이 권한을 갖습니다. 루트가 아닌 사용자를위한 쓰기 가능한 유일한 폴더는 다음과 같습니다.

Home directory (~/)
/tmp
/var/tmp

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

Related 관련 기사

뜨겁다태그

보관