以下の内容はhttps://htn20190109.hatenablog.com/entry/2023/12/30/170159より取得しました。


Kubernetes Podマニフェスト

参考文献: Kubernetesマイクロサービス開発の実践 (早川博 著)


kubectl explain pod
kubectl api-resources


cat <<-'EOF' > pod.yaml

apiVersion: v1
kind: Pod
metadata:
  name: pod01
spec:
  containers:
  - name: con01
    image: nginx:1.23.4
    ports:
    - containerPort: 80
  - name: con02
    image: busybox
    command: ["/bin/sh"] 
    args: ["-c", "while true; do date >> ~/app.log; sleep 1; done"] 


EOF


kubectl apply -f pod.yaml
kubectl get pod

kubectl describe pod pod01
kubectl logs pod01
kubectl logs pod01 -c con01
kubectl logs pod01 -c con02
kubectl get events


kubectl delete -f pod.yaml

 

 




以上の内容はhttps://htn20190109.hatenablog.com/entry/2023/12/30/170159より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14