Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

kubernetes get logs from pod

kubectl logs <pod-name>
Comment

find logs in kubernetes pods

 kubectl logs elasticsearch-master-1 --since=2m --timestamps
Comment

container logs kubernetes

apiVersion: v1
kind: Pod
metadata:
  name: counter
spec:
  containers:
  - name: count
    image: busybox:1.28
    args:
    - /bin/sh
    - -c
    - >
      i=0;
      while true;
      do
        echo "$i: $(date)" >> /var/log/1.log;
        echo "$(date) INFO $i" >> /var/log/2.log;
        i=$((i+1));
        sleep 1;
      done      
    volumeMounts:
    - name: varlog
      mountPath: /var/log
  - name: count-log-1
    image: busybox:1.28
    args: [/bin/sh, -c, 'tail -n+1 -F /var/log/1.log']
    volumeMounts:
    - name: varlog
      mountPath: /var/log
  - name: count-log-2
    image: busybox:1.28
    args: [/bin/sh, -c, 'tail -n+1 -F /var/log/2.log']
    volumeMounts:
    - name: varlog
      mountPath: /var/log
  volumes:
  - name: varlog
    emptyDir: {}
Comment

PREVIOUS NEXT
Code Example
Shell :: search file in ubuntu 
Shell :: nmap udp scan 
Shell :: git chnage to commit id 
Shell :: ng command not found 
Shell :: git remove deleted remote branches 
Shell :: putty zip command 
Shell :: find file by name linux 
Shell :: install sweetlalert angular 
Shell :: install yarn fedora 
Shell :: copy from master to branch 
Shell :: Could not resolve dependency: peer @angular/common@"^8.0.0" from @ng-bootstrap/ng-bootstrap@5.3.1 
Shell :: raspberry pi scan networks 
Shell :: git remote add upstream 
Shell :: know version of centos ec2 
Shell :: if -z in bash 
Shell :: install haskell 
Shell :: better discord how to install plugins 
Shell :: change ratio vmware ubuntu 
Shell :: where is tomcat installed on mac 
Shell :: how to revert to a specific commit 
Shell :: set path environment variable mac permanently 
Shell :: command to install MySQL 
Shell :: find or locate pip (s) path 
Shell :: bash go to folder 
Shell :: Git marge branch into master 
Shell :: composer install debian 
Shell :: git add and commit all 
Shell :: github visualise branches 
Shell :: powershell run bat file 
Shell :: cmake install 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =