STEP BY STEP PRACTICALS
Saturday, 29 January 2022
KUBERNETES - The kubernetes nodes were reporting in not ready state after restart of ubuntu worker nodes
Kubernetes - The kubernetes nodes were reporting in not ready state after restart of ubuntu worker nodes.
Today after restarting the worker nodes (ubuntu2 and ubuntu3) they were showing in not-ready state.
KUBERNETES - The connection to the server 192.168.181.11:6443 was refused - did you specify the right host or port?
Today when I started by Kubernetes setup (ubuntu1-master node) and ran the command kubectl get nodes I received the below error:-
Error:- The connection to the server 192.168.181.11:6443 was refused - did you specify the right host or port?
In order to solve the issue I ran the below commands on the master node:-
- sudo -i
- swapoff -a
- exit
- strace -eopenat kubectl version
Recommended Books:-
Sunday, 16 January 2022
ANSIBLE - HOW TO DELETE FOLDER FROM REMOTE SERVERS
How to delete folder from Remote Servers
I have created 3 Ubuntu servers with the names:-
Server1 - Installed Ansible
Server2 - Client Node1
Server3- Client Node2
Note:- I installed ansible on Server1.
I have created a file :- vi remove-dir.yml
This will delete the folder /oracle from the app group [Server2 and Server3]
Recommended Books:-
Implementing DevOps with Ansible 2 Paperback
Automation with Ansible Paperback
Ansible for DevOps: Server and configuration management for humans
Ansible: From Beginner to Pro Paperback
Ansible: Up and Running- Automating Configuration Management and Deployment the Easy Way Paperback
ANSIBLE - HOW TO GET THE DISK DETAILS FROM REMOTE SERVERS
How to get the disk details from Remote Servers
I have created 3 Ubuntu servers with the names:-
Server1 - Installed Ansible
Server2 - Client Node1
Server3- Client Node2
Note:- I installed ansible on Server1.
I have created a file :- vi disk-details.yml
This will gather the disk details from the app group [Server2 and Server3]
Recommended Books:-
Implementing DevOps with Ansible 2 Paperback
Automation with Ansible Paperback
Ansible for DevOps: Server and configuration management for humans
Ansible: From Beginner to Pro Paperback
Ansible: Up and Running- Automating Configuration Management and Deployment the Easy Way Paperback
ANSIBLE - HOW TO CREATE A FOLDER AND CREATE A FILE NAMED WELCOME USING ANSIBLE FILE/COPY MODULE
How to create a folder using Ansible File Module and create a file named welcome
I have created 3 Ubuntu servers with the names:-
Server1 - Installed Ansible
Server2 - Client Node1
Server3- Client Node2
Note:- I installed ansible on Server1.
I have created a file :- vi create-file.yml
This will create the directory oracle on the / partition and welcome file under it
for app group [Server2 and Server3]
The above task has been completed successfully. We can validate the folder and file creation.
ANSIBLE - HOW TO RUN THE ANSIBLE PLAYBOOK IN SIMULATION MODE
How to run the ansible playbook in Simulation Mode.
In order to run the playbook in simulation mode, we can run the command - ansible-playbook -C [Name of the playbook].
In my example, I am running it for the playbook - create-dir-oracle.yml
Recommended Books:-
Implementing DevOps with Ansible 2 Paperback
Automation with Ansible Paperback
Ansible for DevOps: Server and configuration management for humans
Ansible: From Beginner to Pro Paperback
Ansible: Up and Running- Automating Configuration Management and Deployment the Easy Way Paperback