<p>I run spring boot in the local environment, the log file is created well.
But when I run it on k8s, it works normally, but I can't find the log.
I tried to go into the pod and search for it, but I couldn't find it.
please help me.
Let me explain the environment I tested.</p>
<p>nfs directory is
&quot;/ktnfs&quot;</p>
<p>logback.xml setting is as below.</p>
<pre><code>&lt;property name=&quot;LOG_PATH&quot; value=&quot;/ktnfs/kt/logs&quot;/&gt;
&lt;property name=&quot;LOG_FILE_NAME&quot; value=&quot;api-out&quot;/&gt;
&lt;property name=&quot;ERR_LOG_FILE_NAME&quot; value=&quot;api-err&quot;/&gt;
</code></pre>
<p>Below is the yaml file I created.</p>
<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: kt-nfs-pv
spec:
  capacity:
    storage: 6Gi
  accessModes:
    - ReadWriteMany
  nfs:
    server: 172.30.1.80
    path: &quot;/ktnfs&quot;
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: kt-nfs-pvc
  namespace: kt2
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: &quot;&quot;
  resources:
    requests:
      storage: 2Gi
  volumeName: kt-nfs-pv
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kt-api-server
  namespace: kt2
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kt-api-server
  strategy: {}
  template:
    metadata:
      labels:
        app: kt-api-server
    spec:
      containers:
      - image: 172.30.1.85:31113/nlu_public/kt-api-server:1.0
        name: kt-api-server
        volumeMounts:
          - mountPath: /ktnfs/kt/logs
            name: kt-nfs-volume
      volumes:
      - name: kt-nfs-volume
        persistentVolumeClaim:
          claimName: kt-nfs-pvc
status: {}
</code></pre>

강정화
<p>I solved the problem.
It was a problem that occurred because the logback.xml modifications were not applied when the docker build was done without modifying the version.</p>
