Git Product home page Git Product logo

core_kubernetes's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

core_kubernetes's Issues

5장 Volume에 emptyDir 예제 수정 요청

# volume-empty.yaml
apiVersion: v1
kind: Pod
metadata:
  name: volume-empty
  labels:
    name: volume-empty
spec:
  containers:
  - name: nginx
    image: nginx
    volumeMounts: # 컨테이너 내부의 연결 위치 지정
    - name: shared-storage
      mountPath: /container-volume
  - name: redis
    image: redis
    volumeMounts:
    - name: shared-storage
      mountPath: /container-volume
  volumes: 
  - name: shared-storage
    emptyDir: {}
# pod 내부의 컨테이너간 공유 디렉토리 pod 생성
$ kubectl apply -f volume-empty.yaml
# pod/volume-empty created

# pod 내부의 각각의 컨테이너에 접근하기
$ kubectl exec -it volume-empty --container nginx -- bash
# root@volume-empty:/$ cd /container-volume/
# root@volume-empty:/container-volume$ touch volume.txt
# root@volume-empty:/container-volume# ls -al
# total 8
# drwxrwxrwx 2 root root 4096 Oct 22 09:59 .
# drwxr-xr-x 1 root root 4096 Oct 22 09:55 ..
# -rw-r--r-- 1 root root    0 Oct 22 09:59 volume.txt

# 다른 컨테이너에서 내용 확인
$ kubectl exec -it volume-empty --container redis -- bash
# root@volume-empty:/data# ls -al /container-volume/
# total 8
# drwxrwxrwx 2 root root 4096 Oct 22 09:59 .
# drwxr-xr-x 1 root root 4096 Oct 22 09:55 ..
# -rw-r--r-- 1 root root    0 Oct 22 09:59 volume.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.