k8s ansible install

Ansible role to setup 1 master +2 node kubernetes cluster (more nodes can be added) setup centos VMs configure hostnames Update hosts file template in ../roles/kubernetes-deploy/files/hosts.template with host names and ipaddress setup password less auth between your Ansible host and Kubernetes nodes $ ssh-copyid root@kube-nodes? setup Ansible inventory kube-master.rmohan.com hostrole=master kube-node1.rmohan.com hostrole=node kube-node2.rmohan.com hostrole=node Run […]

Read more
Get YAML for deployed Kubernetes

ombining other answers, this is what I came up with for bash: for n in $(kubectl get -o=name pvc,configmap,serviceaccount,secret,ingress,service,deployment,statefulset,hpa,job,cronjob) do mkdir -p $(dirname $n) kubectl get -o=yaml –export $n > $n.yaml done kubectl get all –export=true -o yaml !/bin/env bash i=$((0)) for n in $(kubectl get -o=custom-columns=NAMESPACE:.metadata.namespace,KIND:.kind,NAME:.metadata.name pv,pvc,configmap,ingress,service,secret,deployment,statefulset,hpa,job,cronjob –all-namespaces | grep -v ‘secrets/default-token’) do if […]

Read more
AWS : SIMPLE SYSTEMS MANAGER (SSM)

What is Simple Systems Manager Amazon EC2 Simple Systems Manager (SSM) is an Amazon Web Services tool that allows us to automatically configure virtual servers in a cloud or in on-premises data center. We can use scripts, commands or the Elastic Compute Cloud (EC2) console to manage EC2 instances, virtual machines (VMs) or servers hosted […]

Read more
mysqldump + gzip + aws

A shell script to backup MYSQL database and upload it to Amazon S3. Note Make sure the AWS CLI is installed properly mysqldump + gzip + aws Dump the database with mysqldump and gzip it into a folder, later uses the aws command to upload the file to Amazon S3 backup-script.sh !/bin/bash # # MySQL […]

Read more
Tomcat log automatic deletion implementation

Tomcat log automatic deletion implementation ackground In the production environment, Tomcat generates a lot of logs every day. If you don’t clean up the disk capacity, it will be enough. Manual cleaning is too much trouble. Therefore, write a script to delete the log files 5 days ago (depending on the actual situation). Writing a […]

Read more
Steps to install Oracle 19c in CentOS 7.6 RPM mode

Steps to install Oracle 19c in CentOS 7.6 RPM mode Download the required installation package: 1.1 preinstall http://yum.Oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm 1.2 Oracle rpm installation package https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html It is recommended to download at home or see the VPN proxy download speed in the company. Installation. yum localinstall -y oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm Install after installation is complete yum localinstall -y oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm […]

Read more
CentOS 7.6 configures Nginx reverse proxy

Using a three CentOS 7 virtual machine to build a simple Nginx reverse proxy load cluster, three virtual machine addresses and functions 192.168.1.76 nginx load balancer 192.168.1.82 web01 server 192.168.1.78 web02 server Second, install the nginx software (the following operations must be carried out on three virtual machines) Some Centos 7.6 does not have the […]

Read more
selinux nginx

Restart Nginx and bind() to 0.0.0.0:8088 failed (13: Permission denied) First declare: If you do not use SELinux you can skip this article. The Nginx service is installed on ContOS 7. For the project, you need to modify the default 80 port of Nginx to 8088. After modifying the configuration file, restart the Nginx service […]

Read more
Check if host is a live bash script

!/bin/bash # TCP-ping in bash (not tested) HOSTNAME=”$1″ PORT=”$2″ if [ “X$HOSTNAME” == “X” ]; then echo “Specify a hostname” exit 1 fi if [ “X$PORT” == “X” ]; then PORT=”22″ fi exec 3<>/dev/tcp/$HOSTNAME/$PORT if [ $? -eq 0 ]; then echo “Alive.” else echo “Dead.” fi exec 3>&-

Read more

Hit Counter provided by dental implants orange county