Created
          September 28, 2020 02:07 
        
      - 
      
 - 
        
Save feiskyer/6e3104d3ca63d7b242ff70e90a133ed1 to your computer and use it in GitHub Desktop.  
    Grabe calico-packet logs from syslog
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | apiVersion: crd.projectcalico.org/v1 | |
| kind: GlobalNetworkPolicy | |
| metadata: | |
| name: calico-log | |
| spec: | |
| egress: | |
| - action: Log | |
| destination: {} | |
| protocol: TCP | |
| source: {} | |
| - action: Log | |
| destination: {} | |
| protocol: UDP | |
| source: {} | |
| - action: Allow | |
| ingress: | |
| - action: Log | |
| destination: {} | |
| protocol: TCP | |
| source: {} | |
| - action: Log | |
| destination: {} | |
| protocol: UDP | |
| source: {} | |
| - action: Allow | |
| types: | |
| - Ingress | |
| - Egress | |
| --- | |
| apiVersion: apps/v1 | |
| kind: DaemonSet | |
| metadata: | |
| name: "calico-packet-logs" | |
| namespace: "default" | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: "calico-packet-logs" | |
| template: | |
| metadata: | |
| labels: | |
| app: "calico-packet-logs" | |
| spec: | |
| containers: | |
| - name: "calico-packet-logs" | |
| image: "alpine" | |
| command: | |
| - sh | |
| - -c | |
| - tail -f /var/log/syslog | grep 'calico-packet:' | |
| volumeMounts: | |
| - name: "iptables-logs" | |
| mountPath: "/var/log" | |
| readOnly: true | |
| volumes: | |
| - name: "iptables-logs" | |
| hostPath: | |
| path: "/var/log" | |
| nodeSelector: | |
| beta.kubernetes.io/os: linux | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment