Skip to content
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

[k8s] 용어 정리 #5

Open
daehwan2da opened this issue Aug 20, 2023 · 0 comments
Open

[k8s] 용어 정리 #5

daehwan2da opened this issue Aug 20, 2023 · 0 comments
Labels

Comments

@daehwan2da
Copy link
Owner

kubernates 의 기초 용어들을 정리합니다.

StatefulSet (link)

StatefulSet 은 workload API object 로, Stateful 한 Application 을 관리하기 위함이다.

  • 생성되는 Pod 명의 접미사는 숫자 인덱스가 부여된다.
    • sample-statefulset-0, sample-statefulset-1, ...
    • Pod 명이 변경되지 않는다.
  • 데이터를 영구적으로 저장힉 위한 구조로 되어있다.
  • valuable for applications
    • 안정적이고, 유니크한 네트워크 구분자가 필요한 경우
    • 안정적이고, 영구적인 저장소가 필요한 경우 (상태 유지)
    • graceful 한 deployment, scalling (ordered)
    • 자동적으로 업데이트 (ordered)
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: sample-statefulset
spec:
  serviceName: sample-statefulset
  replicas: 3
  selector:
    matchLabels:
      app: sample-app
    template:
      metadata:
        labels:
          app: sample-app
      spec:
        containers:
        - name: nginx-container
          image: nginx:1.16
          volumnMounts:
          - name: www
            mountPath: /usr/share/nginx/html
  volumneChainTemplates:
  - metadata:
      name: www
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 1G
@daehwan2da daehwan2da added the k8s label Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant