Skip to content

Instantly share code, notes, and snippets.

View saad749's full-sized avatar

Saad Farooq saad749

View GitHub Profile
@saad749
saad749 / hide_code_pdf.md
Created January 14, 2020 11:28 — forked from macoj/hide_code_pdf.md
Hiding code when exporting jupyter notebook to pdf
@saad749
saad749 / ifconfig -a.txt
Created March 3, 2018 13:24
ifconfig -a - flannel.1 deleted
cni0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 10.244.0.1 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::e003:c6ff:fe8b:d57 prefixlen 64 scopeid 0x20<link>
ether 0a:58:0a:f4:00:01 txqueuelen 1000 (Ethernet)
RX packets 219055 bytes 47763012 (47.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 223327 bytes 52854142 (52.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
datapath: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1376
@saad749
saad749 / ifconfig -a.txt
Created March 3, 2018 08:59
ifconfig -a - Kubernetes/OpenFaaS
kube-master@ubuntu:~/faas-netes$ sudo ifconfig -a
cni0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 10.244.0.1 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::e003:c6ff:fe8b:d57 prefixlen 64 scopeid 0x20<link>
ether 0a:58:0a:f4:00:01 txqueuelen 1000 (Ethernet)
RX packets 219055 bytes 47763012 (47.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 223327 bytes 52854142 (52.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
@saad749
saad749 / journalctl -xeu kubelet.txt
Created March 2, 2018 17:17
journalctl -xeu kubelet results after chnaging the kubeadm.conf and kubeadm join from the second node.
kube-master@ubuntu:~$ journalctl -xeu kubelet
Mar 02 09:15:30 ubuntu kubelet[32906]: W0302 09:15:30.533376 32906 kubelet.go:1591] Deleting mirror pod "kube-scheduler-ubuntu_kube-system(4efb78bb-1e3d-11e8-8771-000c29fabc81)" because it is outdated
Mar 02 09:15:30 ubuntu kubelet[32906]: W0302 09:15:30.534088 32906 kubelet.go:1591] Deleting mirror pod "kube-apiserver-ubuntu_kube-system(4de8a0e5-1e3d-11e8-8771-000c29fabc81)" because it is outdated
Mar 02 09:15:30 ubuntu kubelet[32906]: W0302 09:15:30.534396 32906 kubelet.go:1591] Deleting mirror pod "etcd-ubuntu_kube-system(4e0720bd-1e3d-11e8-8771-000c29fabc81)" because it is outdated
Mar 02 09:15:31 ubuntu kubelet[32906]: W0302 09:15:31.536430 32906 kubelet.go:1591] Deleting mirror pod "kube-controller-manager-ubuntu_kube-system(4e80d798-1e3d-11e8-8771-000c29fabc81)" because it is outdated
Mar 02 09:15:32 ubuntu kubelet[32906]: W0302 09:15:32.545274 32906 kubelet.go:1591] Deleting mirror pod "etcd-ubuntu_kube-system(500dec3c-1e3d-11e8-8771-000c29fabc81
@saad749
saad749 / ifconfig -a.txt
Created March 2, 2018 17:15
ifconfig -a for master
kube-master@ubuntu:~$ sudo ifconfig -a
[sudo] password for kube-master:
cni0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 10.244.0.1 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::e003:c6ff:fe8b:d57 prefixlen 64 scopeid 0x20<link>
ether 0a:58:0a:f4:00:01 txqueuelen 1000 (Ethernet)
RX packets 219055 bytes 47763012 (47.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 223327 bytes 52854142 (52.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
@saad749
saad749 / journalctl -xeu kubelet.txt
Created March 2, 2018 17:13
journalctl -xeu kubelet logs
Feb 27 12:21:35 ubuntu kubelet[56317]: I0227 12:21:35.575306 56317 container_manager_linux.go:266] Creating device plugin manager: false
Feb 27 12:21:35 ubuntu kubelet[56317]: I0227 12:21:35.575423 56317 kubelet.go:290] Adding manifest path: /etc/kubernetes/manifests
Feb 27 12:21:35 ubuntu kubelet[56317]: I0227 12:21:35.575437 56317 kubelet.go:313] Watching apiserver
Feb 27 12:21:35 ubuntu kubelet[56317]: W0227 12:21:35.591425 56317 kubelet_network.go:139] Hairpin mode set to "promiscuous-bridge" but kubenet is not enabled, falling back to "hairpin-veth"
Feb 27 12:21:35 ubuntu kubelet[56317]: I0227 12:21:35.591460 56317 kubelet.go:571] Hairpin mode set to "hairpin-veth"
Feb 27 12:21:35 ubuntu kubelet[56317]: W0227 12:21:35.591527 56317 cni.go:171] Unable to update cni config: No networks found in /etc/cni/net.d
Feb 27 12:21:35 ubuntu kubelet[56317]: I0227 12:21:35.591547 56317 client.go:80] Connecting to docker on unix:///var/run/docker.sock
Feb 27 12:21:35 ubuntu
@saad749
saad749 / a.txt
Created March 2, 2018 17:12
kubectl describe nodes with flannel
Name: ubuntu
Roles: master
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/hostname=ubuntu
node-role.kubernetes.io/master=
Annotations: flannel.alpha.coreos.com/backend-data={"VtepMAC":"6a:2a:47:dc:99:a1"}
flannel.alpha.coreos.com/backend-type=vxlan
flannel.alpha.coreos.com/kube-subnet-manager=true
flannel.alpha.coreos.com/public-ip=192.168.100.12
@saad749
saad749 / 10-kubeadm.conf
Created March 2, 2018 17:03
Changed --cluster-dns
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true"
Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
Environment="KUBELET_DNS_ARGS=--cluster-dns=192.168.100.17 --cluster-domain=cluster.local"
Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt"
Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0"
Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true --cert-dir=/var/lib/kubelet/pki"
Environment="KUBELET_EXTRA_ARGS=--node-ip=192.168.100.17"
ExecStart=
@saad749
saad749 / 10-kubeadm.conf
Created March 2, 2018 17:02
Added KUBELET_EXTRA_ARGS
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true"
Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
Environment="KUBELET_DNS_ARGS=--cluster-dns=10.96.0.10 --cluster-domain=cluster.local"
Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt"
Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0"
Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true --cert-dir=/var/lib/kubelet/pki"
Environment="KUBELET_EXTRA_ARGS=--node-ip=192.168.100.17"
ExecStart=
@saad749
saad749 / kubectl describe nodes results.txt
Created March 2, 2018 16:59
kubectl describe nodes results
kube-master@ubuntu:~$ kubectl describe nodes
Name: ubuntu
Roles: master
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/hostname=ubuntu
node-role.kubernetes.io/master=
Annotations: node.alpha.kubernetes.io/ttl=0
volumes.kubernetes.io/controller-managed-attach-detach=true
Taints: node-role.kubernetes.io/master:NoSchedule