Main Menu

Search

HTML - Home - ABOUT TARBOTS


Welcome to tarbots.com
... AI Search Assistant

This site has articles which provides information on everyday commands, procedures & scripts for DevOps & Infrastructure technologies which will be very useful for System Admin, DevOps, CloudOps, Network Admins and any teams or individuals working on Infrastructure technologies.

CLICK HERE to learn more about tarbots.com


Technologies Covered In This Site

HTML - HOME - RECENT ARTICLES TITLE


Recent Articles


PODMAN: How To Configure Podman Container Instance As System Unit Service To Autorestart When the Host OS Reboots

Please find the steps below for enabling the podman container instance to auto restart when the OS is rebooted.

1) list the podman instances to get the container ID and name. 

podman ps -a

For e.g. below output

# podman ps -a
CONTAINER ID  IMAGE           COMMAND   CREATED        STATUS     PORTS       NAMES
45782651b66d  localhost/ock-ostree:latest nginx -g daemon o...  2 minutes ago  Up 2 minutes           0.0.0.0:8080->80/tcp    ock-content-server

2) Configure the podman container instance as service and enable the service. 

For this use below steps.

2(a) Create systemd file for podman container instances. In below command replace the name with container ID and os-tree-podman.service with the service name of choice.

podman generate systemd --new --name 9596fff2a7b1>/etc/systemd/system/ostree-podman.service

Above command will create a file /etc/systemd/system/ostree-podman.service

2(b) Restart the system daemon

systemctl daemon-reload

2(c) Enable the newly created podman container system unit file.

systemctl enable ostree-podman.service

2(d) List the system unit files 

systemctl list-unit-files | grep -i podman

You should see the newly created podman container system unit file and it should be enabled. For e.g. below output

# systemctl list-unit-files | grep -i podman
ostree-podman.service  enabled  


3) Reboot the host and  validate that the podman container instances is auto restarted.

For veirfying this, run below command.

podman ps -a


Keywords

Configuring setting up setup autorestart auto-restart service unit files files containers instances operating system rebooting reboots reboot restart restarting restarts os

KUBERNETES: Deploy Sample nginx Weblogic (from Docker.io) to Kubernetes Cluster For Testing

KUBERNETES: Deploy Sample nginx Weblogic (from Docker.io) to Kubernetes Cluster For Testing

1) Create nginx deployment yaml file. For e.g. nginx.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
name: my-webapp
spec:
replicas: 3
selector:
matchLabels:
app: my-webapp
template:
metadata:
labels:
app: my-webapp
spec:
containers:
- name: my-webapp
image: nginx:1.7.9
ports:
- containerPort: 80

2)Create nginx service yaml file to listen on the Nodeport. For e.g. nginx-service-nodeport.yaml
apiVersion: v1
kind: Service
metadata:
  name: my-webapp-service
spec:
  selector:
    app: my-webapp
  ports:
  - port: 80
    targetPort: 80
    nodePort: 30007
  type: NodePort
3) Deployment the nginx webapp and create service. 
kubectl apply -f nginx.yaml
kubectl apply -f nginx-service-nodeport.yaml
4) Check the deployment and service are created in default namespace.
For this run below command.
kubectl get all
Below is sample output.
NAME                             READY   STATUS    RESTARTS   AGE
pod/my-webapp-6c854bcc4c-256kh   1/1     Running   0          8m19s
pod/my-webapp-6c854bcc4c-ghnnv   1/1     Running   0          8m19s
pod/my-webapp-6c854bcc4c-v87jj   1/1     Running   0          8m19s

NAME                        TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
service/kubernetes          ClusterIP   10.96.0.1       <none>        443/TCP        3d20h
service/my-webapp-service   NodePort    10.101.27.114   <none>        80:30007/TCP   6m50s

NAME                        READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/my-webapp   3/3     3            3           8m19s

NAME                                   DESIRED   CURRENT   READY   AGE
replicaset.apps/my-webapp-6c854bcc4c   3         3         3       8m19s
5) Acccess the nginx webapp using nodeport 30007 and Kubernetes machine IP where pod is running.
http://IP:30007


keywords
deploying install installing nginx example sample samples examples web app webapp application services


LINUX: Netstat Command To Check the TCP Details - PacketLoss, Retransmits, Dropped, Aborted Connections Etc. For Troubleshooting

"netstat -s" command can be used for checking the TCP network details to check packetloss, retransmits, dropped, aborted connections etc. for troubleshooting.

Below is sample output.

#netstat -s | egrep -i "timeout|retransmit|segments|lost|TcpRetransSegs|drop"

    20 fragments dropped after timeout
    22297220 segments received
    22212157 segments sent out
    4461 segments retransmitted
    0 bad segments received
    Detected reordering 4 times using reno fast retransmit
    TCPLostRetransmit: 1281
    5 timeouts in loss state
    32 fast retransmits
    19 retransmits in slow start
    TCPTimeouts: 2531
    221 connections aborted due to timeout
    TcpTimeoutRehash: 1705



Keywords:

troubleshoot troubleshooting network networking issue issues problem problems debug debugging check checking bottleneck performance stall stalled packets transmit transmission 

KUBERNETES: How to Check the Liveness and Readiness Probe for Kube apiserver?

Kube apiserver liveness and readiness probe settings can be checked inside /etc/kubernetes/manifests/kube-apiserver.yaml file on the Kubernetes nodes.

Keywords:

liveness liveliness ready readiness probe probes monitor monitoring check checking