This post is to illustrate how to access the docker container’s network namespace. 1. Identify the docker container id you want to access and run below command as root on host. # docker ps 2. Get docker container’s PID: # pid=$(docker inspect -f ‘{{.State.Pid}}’ ${container_id}) 3. Create netns directory: # mkdir -p /var/run/netns/ 4. Create […]
Archives for July 2019
How To Change The Time Zone For A Docker Container
The goal of this post is to set up the timezone on the container to match the same timezone on the Docker server, this will allow users to see the same time in both instances (Docker Server and Container). Most of the time Containers do not use the same time as the Docker server, this […]
Yum Fails with “Error: database disk image is malformed” in /var/log/messages
The Problem Unable to execute any command related to yum and below error messages found in /var/log/messages file. For example: # yum update Loaded plugins: aliases, changelog, downloadonly, kabi, presto, refresh-packagekit, security, tmprepo, verify, versionlock Loading support for kernel ABI Setting up Install Process Ol6_latest | 3.0 kB 00:00 Ol6_latest/primary_db | 78 MB 00:10 [Errno […]
How to Install Apache, MariaDB, and PHP (FAMP) stack on FreeBSD 11
In this tutorial we will show you how to install Apache, MariaDB, and PHP on FreeBSD 11. If you don’t know FAMP is the acronym of FreeBSD, Apache, MySQL/MariaDB, PHP. FreeBSD 11 is the latest version right now when this article was made. Prerequisites Before you begin with this guide, you should at least have […]
How to configure apache virtual host on ubuntu
In this tutorial, we will guide you to configure the apache virtual host or vhost on ubuntu 16.04. Using virtual host allow the administrator to use one server to host multiple domains or sites off of a single interface or IP by using a matching mechanism. Basically, you can you one IP address to server […]
How to Clone Linux disk partition over network using dd
In this tutorial, we will show you how to clone Linux harddisk partition over a network, in this tutorial we will use dd command. For the guys who don’t know what dd is – it is a command-line utility for Unix and Unix-like operating systems whose primary purpose is to convert and copy files. Clone […]
How To Access Kubernetes Dashboard Externally
Following is an alternative workaround to access Dashboard externally. 1. kubernetes-dashboard is a service file which provides dash-board functionality, to edit this we need to edit dashboard service and change service “type” from ClusterIP to NodePort: [root@kubeXXXX]# kubectl -n kube-system edit service kubernetes-dashboard # Please edit the object below. Lines beginning with a ‘#’ will […]
New User Failed Run Kubectl with Error “The connection to the server xxx.xxx.xxx was refused – did you specify the right host or port?”
The Problem When run kubectl from a new created user, failed with error: The connection to the server xxx.xxx.xxx was refused – did you specify the right host or port? The Solution A newly created user has no KUBECONFIG configured. Setup kubernetes configuration for the new user: # mkdir -p $HOME/.kube # sudo cp -i […]
How to schedule master node running pod/service as a worker node
Question: How can I schedule master node running pod/service as worker node? By deafult, only worker node could run the pod, master only response for the scheduler/configuration. $ kubectl get nodes -o json | jq .items[].spec.taints [ { “effect”: “NoSchedule”, “key”: “node-role.kubernetes.io/master” } ] $ kubectl get nodes -o json | grep master “node-role.kubernetes.io/master”: “” […]
Endpoint is not Created for Service in Kubernetes
The Problem Endpoints shows ‘none’: $ kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.yy.0.1 <none> 443/TCP 9d test ClusterIP 10.xx.97.97 <none> 6379/TCP 21s $ kubectl describe svc test Name: test Namespace: default Labels: <none> Annotations: kubectl.kubernetes.io/last-applied-configuration: {“apiVersion”:”v1″,”kind”:”Service”,”metadata”:{“annotations”:{},”name”:”test”,”namespace”:”default”},”spec”:{“clusterIP”:”10.xx.97.97″,”… Selector: app=test Type: ClusterIP IP: 10.xx.97.97 Port: <unset> 6379/TCP TargetPort: 6379/TCP Endpoints: <none> Session […]