Skip to content

Instantly share code, notes, and snippets.

# Author = Nikhil Venkat Sonti
# email = nikhilsv92@gmail.com
# github ID = shadowfax92
import sys
from xml.dom.minidom import _get_StringIO
from lxml import html
import requests
import os
import re
import time
@karthik101
karthik101 / audit.rules
Created June 6, 2018 13:52 — forked from Neo23x0/audit.rules
Linux Auditd Best Practice Configuration
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
#
# Linux Audit Daemon - Best Practice Configuration
# /etc/audit/audit.rules
#
# Compiled by Florian Roth
@karthik101
karthik101 / docker_images.sh
Created September 14, 2018 10:52 — forked from hydra1983/docker_images.sh
Save and load docker images in batch
#!/bin/bash
readonly DB_FILE="$(pwd)/images.db"
readonly IMG_DIR="$(pwd)/images"
save-images() {
echo "Create ${DB_FILE}"
echo "$(docker images|grep -v 'IMAGE ID'|awk '{printf("%s %s %s\n", $1, $2, $3)}'|column -t)" > "${DB_FILE}"
echo "Read ${DB_FILE}"
@karthik101
karthik101 / install_docker.sh
Created October 29, 2018 09:56
install docker-ce-17.03.2.ce centos
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
yum install --setopt=obsoletes=0 \
docker-ce-17.03.2.ce-1.el7.centos.x86_64 \
docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch
@karthik101
karthik101 / python-package-offline-install-notes.md
Created October 31, 2018 09:45
python-package-offline-install-notes.md

Offline Python Package Install Notes Two common cases which make the install of Python packages harder due to networking issues are: a) Install behind a Proxy b) Install without access to the internet

(a) Install behind a Proxy In the case where the target machine connects to the internet over a network proxy, export the following environment vars, as appropriate - http_proxy and https_proxy. Eg:

$ export https_proxy=http://proxy.mydomain.com: $ export http_proxy=http://proxy.mydomain.com: $ pip install (b) Install without access to the internet

[root@node1 kubespray-2.6.0]# ansible-playbook -v -i inventory/mycluster/hosts.ini cluster.yml --flush-cache
Using /root/kubespray-2.6.0/ansible.cfg as config file
/root/kubespray-2.6.0/inventory/mycluster/hosts.ini did not meet host_list requirements, check plugin documentation if this is unexpected
/root/kubespray-2.6.0/inventory/mycluster/hosts.ini did not meet script requirements, check plugin documentation if this is unexpected
/root/kubespray-2.6.0/inventory/mycluster/hosts.ini did not meet yaml requirements, check plugin documentation if this is unexpected
PLAY [localhost] ***************************************************************************************************************************************
TASK [download : include_tasks] ************************************************************************************************************************
Friday 16 November 2018 05:13:24 -0500 (0:00:00.389) 0:00:00.389 *******
This file has been truncated, but you can view the full file.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
KUBE-API POD LOGS
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
[root@node1 kubespray-2.6.0]# clear
[root@node1 kubespray-2.6.0]# kubectl logs kube-apiserver-node1 -n kube-system
I1116 20:35:11.066436 1 feature_gate.go:190] feature gates: map[VolumeScheduling:false MountPropagation:false PersistentLocalVolumes:false]
Flag --insecure-bind-address has been deprecated, This flag will be removed in a future version.
Flag --insecure-port has been deprecated, This flag will be removed in a future version.
I1116 20:35:11.066655 1 flags.go:27] FLAG: --address="127.0.0.1"
[root@node1 kubespray-2.6.0]# kubectl describe po kube-dns-69f4c8fc58-lx9hh -n kube-system
Name: kube-dns-69f4c8fc58-lx9hh
Namespace: kube-system
Node: node1/10.10.10.105
Start Time: Fri, 16 Nov 2018 16:14:00 -0500
Labels: k8s-app=kube-dns
pod-template-hash=2590749714
Annotations: scheduler.alpha.kubernetes.io/critical-pod=
Status: Running
IP: 10.233.102.132
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
KUBE-DNS POD LOGS
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
[root@node1 kubespray-2.6.0]# kubectl logs kube-dns-69f4c8fc58-lx9hh kubedns -n kube-system
I1116 21:14:02.092047 1 dns.go:48] version: 1.14.10
I1116 21:14:02.094033 1 server.go:69] Using configuration read from directory: /kube-dns-config with period 10s
I1116 21:14:02.094167 1 server.go:121] FLAG: --alsologtostderr="false"
I1116 21:14:02.094184 1 server.go:121] FLAG: --config-dir="/kube-dns-config"
I1116 21:14:02.094198 1 server.go:121] FLAG: --config-map=""
[root@node1 kubespray-2.6.0]# kubectl logs kube-proxy-node1 -n kube-system
I1116 20:34:53.157754 1 flags.go:27] FLAG: --allow-verification-with-non-compliant-keys="false"
I1116 20:34:53.157803 1 flags.go:27] FLAG: --alsologtostderr="false"
I1116 20:34:53.157810 1 flags.go:27] FLAG: --application-metrics-count-limit="100"
I1116 20:34:53.157816 1 flags.go:27] FLAG: --azure-container-registry-config=""
I1116 20:34:53.157825 1 flags.go:27] FLAG: --bind-address="10.10.10.105"
I1116 20:34:53.157834 1 flags.go:27] FLAG: --boot-id-file="/proc/sys/kernel/random/boot_id"
I1116 20:34:53.157840 1 flags.go:27] FLAG: --cleanup="false"
I1116 20:34:53.157848 1 flags.go:27] FLAG: --cleanup-iptables="false"
I1116 20:34:53.157854 1 flags.go:27] FLAG: --cleanup-ipvs="true"