This a comprehensive list of kubectl commands you'll likely use during the CKA exam, categorized by function:
kubectl cluster-infoTo set up a relay server for Magic Wormhole (a secure peer-to-peer file transfer tool), you need to deploy a transit relay component. This relay helps peers establish direct connections when they cannot communicate directly due to NAT/firewalls. Here's how to set it up:
Magic Wormhole’s transit relay is a separate Python-based server. Install it using pip:
# Install Python and pip (if not already installed)
sudo apt install python3 python3-pip # Debian/UbuntuI hereby claim:
To claim this, I am signing this object:
| # A web server (ports 80, 22 opened) | |
| # on a subnet 10.1.10.0/24 | |
| # in a VPC 10.1.0.0/16 | |
| # in Region us-east-1a (N Virginia) | |
| # Change the source IP in WebSecurityGroup to your testing IP, line 83 and 88 | |
| # Change the SSH key to yours on line 98 | |
| AWSTemplateFormatVersion: "2010-09-09" | |
| Resources: |
$ nmap -A scanme.nmap.org
Starting Nmap 7.40 ( https://nmap.org ) at 2019-09-17 04:51 UTC
Nmap scan report for scanme.nmap.org (45.33.32.156)
Host is up (0.17s latency).
Other addresses for scanme.nmap.org (not scanned): 2600:3c01::f03c:91ff:fe18:bb2f
Not shown: 995 closed ports
PORT STATE SERVICE VERSION
If you created your key pair using AWS, you can use the OpenSSL tools to generate a fingerprint as follows:
$ openssl pkcs8 -in path_to_private_key -inform PEM -outform DER -topk8 -nocrypt | openssl sha1 -c
If you created a key pair using a third-party tool and uploaded the public key to AWS, you can use the OpenSSL tools to generate the fingerprint as follows:
$ openssl rsa -in path_to_private_key -pubout -outform DER | openssl md5 -c
AWS CLI Using pip
$ pip3 install awscli
Check the installation
$ aws --version
| #!/usr/local/bin/python3 | |
| ## Just a concept to display the forex rates from Central Bank, KBZ Bank, AYA Bank and CB Bank of Myanmar | |
| ## TODO: clean the code | |
| from bs4 import BeautifulSoup | |
| import requests,re | |
| import datetime | |
| response = requests.get('http://forex.cbm.gov.mm/api/latest') |