docker run -d --name debian debian /bin/bash -c "echo 'Start'; sleep infinity"
docker exec -it debian /bin/bash
-------
Pod에 접속해서 간단하게 네트워크 등을 점검하고자 할 때
kubectl get pods 로 POD_ID 확인 후
kubectl exec -it POD_ID /bin/bash
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: simple-http-app # Label for the Deployment
name: simple-http-app # Name of Deployment
spec:
selector:
matchLabels:
run: simple-http-app
template: # Pod template
metadata:
labels:
run: simple-http-app # Labels Pods from this Deployment
spec:
containers:
- name: simple-http
image: python:2.7
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args: ["-c", "echo \"<p>Hello1 from $(hostname)</p>\" > index.html; python -m SimpleHTTPServer 6000"]
ports:
- name: http2
containerPort: 6000
'Cloud & Virtualization' 카테고리의 다른 글
Ubuntu 18.04 QEMU-KVM PCI Passthrough 설정하기 (0) | 2018.12.18 |
---|---|
구글 클라우드 Stackdriver Logging 부하 테스트 (0) | 2018.07.31 |
GCP의 Kubernetes Cluster의 Logging/Monitoring에 대한 분석 (0) | 2018.07.20 |
Google Cloud VPN과 Mikrotik 공유기간 IPSec 터널 구성하기 (0) | 2018.07.19 |
Docker Container의 Logging 구조 요약 (1) | 2018.07.12 |