How to create multicontainer pod in AKS

Multi container pod example: -

kushagrarakesh/multicontainerpodexample.yaml at main · kushagrarakesh/kushagrarakesh (github.com)

kubectl create ns chap5

kubectl apply -f multicontinerpodexample.yaml -n chap5


kubectl get pods -n chap5

kubectl describe pod multicontainer -n chap5


PS C:\Users\kusha\chap5> kubectl logs multicontainer  -n chap5

W1028 11:09:06.926695   20740 azure.go:92] WARNING: the azure auth plugin is deprecated in v1.22+, unavailable in v1.26+; use https://github.com/Azure/kubelogin instead.

To learn more, consult https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins

Defaulted container "busybox1" out of: busybox1, alpine, nginx

bin

dev

etc

home

proc

root

sys

tmp

usr

var

PS C:\Users\kusha\chap5> 


this means, it is default showing log of container busybox1  out of: busybox1, alpine, nginx

if you want to see log of specific container specify like below:-


S C:\Users\kusha\chap5> kubectl logs multicontainer -c alpine   -n chap5

W1028 11:10:38.540677   18808 azure.go:92] WARNING: the azure auth plugin is deprecated in v1.22+, unavailable in v1.26+; use https://github.com/Azure/kubelogin instead.

To learn more, consult https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins

bin

dev

etc

home

lib

media

mnt

opt

proc

root

run

sbin

srv

sys

tmp

usr

var

PS C:\Users\kusha\chap5> 



No comments:

Post a Comment