"K8s defaultMode"의 두 판 사이의 차이

 
(같은 사용자의 중간 판 9개는 보이지 않습니다)
3번째 줄: 3번째 줄:
;k8s 디폴트모드
;k8s 디폴트모드


<syntaxhighlight lang='yaml' highlight='17'>
<syntaxhighlight lang='yaml' line highlight='16'>
apiVersion: v1
apiVersion: v1
kind: Pod
kind: Pod
10번째 줄: 10번째 줄:
spec:
spec:
   containers:
   containers:
   - name: myapp
   - name: mypod
     image: ubuntu
     image: redis
     volumeMounts:
     volumeMounts:
     - name: secrets
     - name: foo
       mountPath: "/etc/secrets"
       mountPath: "/etc/foo"
      readOnly: true
   volumes:
   volumes:
   - name: secrets
   - name: foo
     secret:
     secret:
       secretName: mysecret
       secretName: mysecret
       defaultMode: 0400
       defaultMode: 0400
      items:
      - key: username
        path: my-username
</syntaxhighlight>
</syntaxhighlight>
{| class='wikitable'
! 8진수(OCT) !! 10진수(DEC)
|-
| 0400 || 256
|-
| 0755 || 493
|-
| 0777 || 511
|}


==같이 보기==
==같이 보기==
* [[k8s 볼륨]]
* [[k8s 볼륨]]
* [[k8s readOnly]]
* [[k8s readOnly]]
* [[k8s runAsUser]]
* [[k8s securityContext]]
* [[리눅스 퍼미션]]
* [[리눅스 퍼미션]]


==참고==
==참고==
* https://newrelic.com/blog/how-to-relic/how-to-use-kubernetes-secrets
* https://kubernetes.io/docs/concepts/configuration/secret/#secret-files-permissions


[[분류: k8s]]
[[분류: k8s 볼륨]]
[[분류: 퍼미션]]

2023년 2월 11일 (토) 17:26 기준 최신판

1 개요[ | ]

k8s defaultMode
k8s 디폴트모드
apiVersion: v1
kind: Pod
metadata:
  name: mypod
spec:
  containers:
  - name: mypod
    image: redis
    volumeMounts:
    - name: foo
      mountPath: "/etc/foo"
  volumes:
  - name: foo
    secret:
      secretName: mysecret
      defaultMode: 0400
8진수(OCT) 10진수(DEC)
0400 256
0755 493
0777 511

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}