k8s – Concepts & Components (from kubernetes.io)

Master Components Master components provide the cluster’s control plane. Master components make global decisions about the cluster (for example, scheduling), and detecting and responding to cluster events (starting up a new pod when a replication controller’s ‘replicas’ field is unsatisfied). Master components can be run on any machine in the cluster. However, for simplicity, set up scripts typically start all master components on the same machine, and do not run user containers on this machine. See Building High-Availability Clusters for an example multi-master-VM setup. kube-apiserver Component on the master that exposes the Kubernetes API. It is the front-end for the Kubernetes control plane. It is designed to scale horizontally – that is, it scales by deploying more instances. See Building High-Availability Clusters. etcd Consistent and highly-available key value store used as Kubernetes’ backing store for all cluster data. Always have a backup plan for etcd’s data for your Kubernetes cluster. For in-depth information on etcd, see etcd documentation. kube-scheduler Component on the master that

read more k8s – Concepts & Components (from kubernetes.io)

K8s – Installation & Configuration

Hello Guys,   i know it is quite very difficult to install kubernetes in a proxy prone environment. Therefore i decided to take the pain and install kubernetes in my proxy prone environment. I Would Like to share my Steps For Both Master and Worker Node :-  vi .bashrc # Set Proxyfunction setproxy() { export {http,https,ftp}_proxy=”http://<proxy_ip&gt;:<port>” export no_proxy=”localhost,,*.<company_domain_Name>,<internel_ip>” } # Unset Proxyfunction unsetproxy() { unset {http,https,ftp}_proxy} function checkproxy() { env |grep proxy } vi /etc/yum.conf proxy=http://<proxy_ip>:<port> proxy=https://<proxy_ip>:<port> vi /etc/hosts <ip1-master>  kubernetes-1 <ip2-worker>  kubernetes-2 <ip3-worker>  kubernetes-3   mkdir -p /etc/systemd/system/docker.service.d/   vi /etc/systemd/system/docker.service.d/http-proxy.conf   [Service] Environment=HTTP_PROXY=http://<proxy_ip>:<port>/ Environment=HTTPS_PROXY=https://<proxy_ip>:<port>/ Environment=NO_PROXY=<ip1-master>,<ip2-worker>,<ip3-worker> cat <<EOF > /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetesbaseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg EOF   setenforce 0   yum install -y kubelet kubeadm kubectl systemctl enable kubelet && systemctl start kubelet   sed -i “s/cgroup-driver=systemd/cgroup-driver=cgroupfs/g” /etc/systemd/system/kubelet.service.d/10-kubeadm.conf   systemctl daemon-reload systemctl restart kubelet   export no_proxy=”localhost,,*.<company domain>, <ip1-master>,<ip2-worker>,<ip3-worker>”   export KUBECONFIG=/etc/kubernetes/admin.conf   calico recommended for amd64, Flannel is better but needs CIDR to be kubectl

read more K8s – Installation & Configuration

Standard Linux Tuning

Hello Bloggers, Majority of the applications these days are deployed on (Debian / Redhat) Linux Operating System as the Base OS. I Would like to share some generic tuning that can be done before deploying any application on it. Index Component Question / Test / Reason   Network   These are some checks to validate the network setup. [ Network Are the switches redundant? Unplug one switch. Fault-tolerance.     Network Is the cabling redundant? Pull cables. Fault-tolerance.     Network Is the network full-duplex? Double check setup. Performance.           Network adapter (NIC) Tuning   It is recommended to consult with the network adapter provider on recommended Linux TCP/IP settings for optimal performance and stability on Linux. There are also quite a few TCP/IP tuning source on the Internet such as http://fasterdata.es.net/TCP-tuning/linux.html   NIC Are the NIC fault-tolerant (aka. auto-port negotiation)? Pull cables and/or disable network adapter. Fault-tolerance.     NIC Set the transmission queue depth

read more Standard Linux Tuning

CIDR Table – Basic Reference (From Wikipedia)

Address Format Difference to last address Mask Addresses Relative to class Typical use Decimal 2n A, B, C a.b.c.d / 32 + 1 20 ​1⁄256 C Host route a.b.c.d / 31 + 2 21 ​1⁄128 C Point to point links (RFC 3021) a.b.c.d / 30 + 4 22 ​1⁄64 C Point to point links (glue network) a.b.c.d / 29 + 8 23 ​1⁄32 C Smallest multi-host network a.b.c.d / 28 + 16 24 ​1⁄16 C Small LAN a.b.c.d / 27 + 32 25 ⅛ C a.b.c.d / 26 + 64 26 ¼ C a.b.c.d / 25 + 128 27 ½ C Large LAN a.b.c.0 / 24 + 256 28 1 C a.b.c.0 / 23 + 512 29 2 C a.b.c.0 / 22 + 1,024 210 4 C a.b.c.0 / 21 + 2,048 211 8 C Small ISP / large business a.b.c.0 / 20 + 4,096 212 16 C a.b.c.0 / 19 + 8,192 213 32 C ISP / large business a.b.c.0 / 18 +

read more CIDR Table – Basic Reference (From Wikipedia)

TIBCO Adapter Error (AER3-910005) – Exception: “JMS error: “Not allowed to create destination tracking

If you encounter the following error in your adapter logs :- Error AER3-910005 Exception: “JMS error: “Not allowed to create destination tracking=#B0fo–uT5-V4zkYM9A/UbWgUzas# The following are the possibilities and pointers to be checked :- Please check the JMS connection configuration of your adapter is correct. Ensure the JMS user you used have enough permission to create receiver on destination. Check whether dynamic creation is ON or not in your EMS configuration. If your destination is a queue then check in “queues.conf” and if it is a topic then “topics.conf” file. And if you don’t want to Turn ON dynamic creation then you must create the destinations that are required by the adapter manually before starting the adapter. Finally Kill the BW process and Adapter service, then first start the adapter service and then the BW service. Cause Check the repository settings.

TIBCO Adapters – Received read Advisory Error (JMS Related)

While testing for failover we found that the adapter is not failing over properly to the secondary ems server in case if the primary is down. The adapter logs show the below error. The adapter does not pick up any messages when this error occurs. Advisory: _SDK.ERROR.JMS.RECEIVE_FAILED : { {ADV_MSG, M_STRING, “Consumer receive failed. JMS Error: Illegal state, SessionName: TIBCOCOMJmsTerminatorSession, Destination: Rep.adcom.Rep-COMAdapter_Rep_v1.exit” } {^description^, M_STRING, “” } }. The only way to resolve this is to restart the adapter so that it reconnects to the ems server. Then it picks up the messages.   “JMS Error: Illegal state” usually happens when a JMS call or request occurs in an inappropriate context. For example, a consumer is trying to receive message while the JMS server is down.  In your case you are saying that this is happening during EMS failover from machine1 to machine2. One thing to keep in mind is that depending on the number of oustanding messages, connections, and

read more TIBCO Adapters – Received read Advisory Error (JMS Related)

Docker – Commands to Manipulate the Containers

Parent command Command Description docker container Manage containers Related commands Command Description docker container attach Attach local standard input, output, and error streams to a running container docker container commit Create a new image from a container’s changes docker container cp Copy files/folders between a container and the local filesystem docker container create Create a new container docker container diff Inspect changes to files or directories on a container’s filesystem docker container exec Run a command in a running container docker container export Export a container’s filesystem as a tar archive docker container inspect Display detailed information on one or more containers docker container kill Kill one or more running containers docker container logs Fetch the logs of a container docker container ls List containers docker container pause Pause all processes within one or more containers docker container port List port mappings or a specific mapping for the container docker container prune Remove all stopped containers docker container rename Rename

read more Docker – Commands to Manipulate the Containers

Docker – Add Proxy to Docker Daemon

I am gonna cut the chatter and hit the platter. Proxy Recommendation :-  To Download the image from hub, we need internet connectivity. I’ma show you the Steps to configure the proxy for Docker daemon. Check the OS in which the docker-ce or docker-ee is installed. ubuntu@docker:~$ cat /etc/*release* DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION=”Ubuntu 16.04.3 LTS” NAME=”Ubuntu” VERSION=”16.04.3 LTS (Xenial Xerus)” ID=ubuntu ID_LIKE=debian PRETTY_NAME=”Ubuntu 16.04.3 LTS” VERSION_ID=”16.04″ HOME_URL=”http://www.ubuntu.com/&#8221; SUPPORT_URL=”http://help.ubuntu.com/&#8221; BUG_REPORT_URL=”http://bugs.launchpad.net/ubuntu/&#8221; VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial 2. Check the Docker version ubuntu@docker:~$ sudo docker -v Docker version 17.05.0-ce, build 89658be 3. Create a directory sudo mkdir -p /etc/systemd/system/docker.service.d 4. Create a Proxy Conf vim /etc/systemd/system/docker.service.d/http-proxy.conf [Service] Environment=”HTTP_PROXY=http://<proxy–ip>:<port>/” Environment=”HTTPS_PROXY=https://<proxy–ip>:<port>/” 5. Now try to login to docker ubuntu@docker:~$ sudo docker login Login with your Docker ID to push and pull images from Docker Hub. If you don’t have a Docker ID, head over to https://hub.docker.com to create one. Username: <username> Password: Login Succeeded ubuntu@docker:~$  

Docker – Cheat Sheet

Hello Bloggers, One of the most important thing in learning a new command quickly is going through the cheat Sheet. I Love to go through Cheat Sheets for a quick references, therefore i thought of consolidating some of the cheat sheets available online into my blog, for a quick ref.