Skip to Content
Kubernetes 관리자 인증(CKA) 학습 가이드
book

Kubernetes 관리자 인증(CKA) 학습 가이드

by Benjamin Muschko
May 2025
Beginner to intermediate
204 pages
3h 13m
Korean
O'Reilly Media, Inc.
Content preview from Kubernetes 관리자 인증(CKA) 학습 가이드

검토 질문에 대한 답변

2장, "클러스터 아키텍처, 설치 및 구성"

  1. 먼저 apps 이라는 네임스페이스를 만듭니다. 그런 다음 ServiceAccount를 만듭니다:

    $ kubectl create namespace apps
    $ kubectl create serviceaccount api-access -n apps

    또는 선언적 접근 방식을 사용할 수도 있습니다. apps-namespace.yaml 파일의 정의에서 네임스페이스를 만듭니다:

    apiVersion: v1
    kind: Namespace
    metadata:
      name: apps

    YAML 파일에서 네임스페이스를 만듭니다:

    $ kubectl create -f apps-namespace.yaml

    다음 내용으로 api-serviceaccount.yaml 이라는 새 YAML 파일을 만듭니다:

    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: api-access
      namespace: apps

    create 명령을 실행하여 YAML 파일에서 ServiceAccount를 인스턴스화합니다:

    $ kubectl create -f api-serviceaccount.yaml
  2. create clusterrole 명령을 사용하여 클러스터 역할을 필수적으로 생성합니다:

    $ kubectl create clusterrole api-clusterrole --verb=watch,list,get \
      --resource=pods

    YAML 파일로 시작하려면 api-clusterrole.yaml 파일에 표시된 콘텐츠를 사용하세요:

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      name: api-clusterrole
    rules:
    - apiGroups: [""]
      resources: ["pods"]
      verbs: ["watch","list","get"]

    YAML 파일에서 ClusterRole을 생성합니다:

    $ kubectl create -f api-clusterrole.yaml

    create clusterrolebinding 명령을 사용하여 ClusterRoleBinding을 필수적으로 생성합니다.

    $ kubectl create clusterrolebinding api-clusterrolebinding \
      --serviceaccount=apps:api-access --clusterrole=api-clusterrole

    ClusterRoleBinding의 선언적 접근 방식은 api-clusterrolebinding.yaml 파일에 있는 것과 같이 보일 수 있습니다:

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: api-clusterrolebinding
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: api-clusterrole
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

OpenShift OKD on IBM LinuxONE, Installation Guide

OpenShift OKD on IBM LinuxONE, Installation Guide

Narjisse Zaki, Sylvain Carta, Alexandre Dini

Publisher Resources

ISBN: 9798341653993