서버를 재시작하면 minikube 클러스터도 멈추어서 재시작을 해주어야 합니다.
재시작 후 모든 pod이 다시 정상적으로 올라오나 지켜보고 있었는데 istio-system 네임스페이스에서 authservice-0이 오류가 났습니다.
에러 메세지 :
sysadmin@tyan:~$ k logs -n istio-system authservice-0
time="2022-06-16T01:26:48Z" level=info msg="Starting readiness probe at 8081"
time="2022-06-16T01:26:48Z" level=info msg="No USERID_TOKEN_HEADER specified, using 'kubeflow-userid-token' as default."
time="2022-06-16T01:26:48Z" level=info msg="No SERVER_HOSTNAME specified, using '' as default."
time="2022-06-16T01:26:48Z" level=info msg="No SERVER_PORT specified, using '8080' as default."
time="2022-06-16T01:26:48Z" level=info msg="No SESSION_MAX_AGE specified, using '86400' as default."
time="2022-06-16T01:26:48Z" level=info msg="Starting web server at :8080"
time="2022-06-16T01:26:48Z" level=fatal msg="Error opening bolt store: open /var/lib/authservice/data.db: permission denied"
결국 정리해보자면
open /var/lib/authservice/data.db: permission denied"
위 에러를 해결해야 합니다.
k edit statefulset -n istio-system authservice
spec.template.spec.initContainers
섹션을 추가하겠습니다!initContainers:
- name: fix-permission
image: busybox
command: ['sh', '-c']
args: ['chmod -R 777 /var/lib/authservice;']
volumeMounts:
- mountPath: /var/lib/authservice
name: data
kubectl delete pod -n istio-system authservice-0