-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error occurred in the init container(Operation not permitted) #973
Comments
apiVersion: apps/v1 |
I solved the permission issue, but an error occurs as below and the pod is pending. ===========
|
Describe the bug
After executing the helm chart, the following error occurs when running the init container.
➜ ~ kc logs -f vault-0 -c busybox -n security
chown: /vault/logs: Operation not permitted
chown: /vault/logs: Operation not permitted
To Reproduce
Steps to reproduce the behavior:
vault-0 0/1 Init:CrashLoopBackOff 5 (60s ago) 4m13s 10.252.6.12 node01
vault-1 0/1 Init:CrashLoopBackOff 5 (65s ago) 4m11s 10.252.26.87 node02
Other useful info to include: vault pod logs,
kubectl describe statefulset vault
andkubectl get statefulset vault -o yaml
outputName: vault
Namespace: security
CreationTimestamp: Mon, 30 Oct 2023 16:41:15 +0900
Selector: app.kubernetes.io/instance=vault,app.kubernetes.io/name=vault,component=server
Labels: app.kubernetes.io/instance=production-retail-mgmt-security-vault
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=vault
Annotations:
Replicas: 2 desired | 2 total
Update Strategy: OnDelete
Pods Status: 0 Running / 2 Waiting / 0 Succeeded / 0 Failed
Pod Template:
Labels: app.kubernetes.io/instance=vault
app.kubernetes.io/name=vault
component=server
helm.sh/chart=vault-0.24.1
Annotations: kubectl.kubernetes.io/restartedAt: 2023-11-06T08:02:25Z
Service Account: vault
Init Containers:
busybox:
Image: docker-hub.com/finalspy/busybox-curl-jq
Port:
Host Port:
Command:
sh
-c
chown -R 1000:1000 /vault/logs
Environment:
Mounts:
/vault/logs from logs (rw)
Containers:
vault:
Image: docker-hub.com/hashicorp/vault:1.13.1-jqcurl
Ports: 8200/TCP, 8201/TCP, 8202/TCP
Host Ports: 0/TCP, 0/TCP, 0/TCP
Command:
/bin/sh
-ec
Args:
cp /vault/config/extraconfig-from-values.hcl /tmp/storageconfig.hcl;
[ -n "${HOST_IP}" ] && sed -Ei "s|HOST_IP|${HOST_IP?}|g" /tmp/storageconfig.hcl;
[ -n "${POD_IP}" ] && sed -Ei "s|POD_IP|${POD_IP?}|g" /tmp/storageconfig.hcl;
[ -n "${HOSTNAME}" ] && sed -Ei "s|HOSTNAME|${HOSTNAME?}|g" /tmp/storageconfig.hcl;
[ -n "${API_ADDR}" ] && sed -Ei "s|API_ADDR|${API_ADDR?}|g" /tmp/storageconfig.hcl;
[ -n "${TRANSIT_ADDR}" ] && sed -Ei "s|TRANSIT_ADDR|${TRANSIT_ADDR?}|g" /tmp/storageconfig.hcl;
[ -n "${RAFT_ADDR}" ] && sed -Ei "s|RAFT_ADDR|${RAFT_ADDR?}|g" /tmp/storageconfig.hcl;
/usr/local/bin/docker-entrypoint.sh vault server -config=/tmp/storageconfig.hcl
Volumes:
config:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: vault-config
Optional: false
logs:
Type: HostPath (bare host directory volume)
Path: /home/logs/security/vault
HostPathType:
home:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit:
timezone:
Type: HostPath (bare host directory volume)
Path: /etc/timezone
HostPathType:
localtime:
Type: HostPath (bare host directory volume)
Path: /etc/localtime
HostPathType:
script:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: vault-auto-unseal
Optional: false
Volume Claims:
Events:
Type Reason Age From Message
Normal SuccessfulCreate 8m6s (x24 over 7d3h) statefulset-controller create Pod vault-0 in StatefulSet vault successful
Normal SuccessfulCreate 8m4s (x24 over 7d3h) statefulset-controller create Pod vault-1 in StatefulSet vault successful
Expected behavior
A clear and concise description of what you expected to happen.
Environment
apiVersion: v2
name: vault
version: 0.24.1
appVersion: 1.13.1
Chart values:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: