brew install cosignbrew install cranekind create cluster --image=kindest/node:v1.24.0| # Customizing Terminal Colors | |
| # | |
| # export PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\]' | |
| cyan='\[\033[1;36m\]' | |
| red='\[\033[1;31m\]' | |
| green='\[\033[1;32m\]' | |
| purple='\[\033[1;35m\]' | |
| reset='\[\033[0m\]' |
brew install cosignbrew install cranekind create cluster --image=kindest/node:v1.24.0| i=0 | |
| while test 1==1 | |
| do | |
| remote_ip=10.25.10.10 | |
| remote_user=enes | |
| local_port=22 | |
| exist=`ps aux | grep $remote_user@$remote_ip | grep $local_port` | |
| if test -n "$exist" | |
| then |
| Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl | |
| and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] | |
| Once the job has completed, check the logs to and export the result to pi-result.txt. | |
| Solution: | |
| kc job pi2000 --image=perl -o yaml --dry-run > pi2000.yaml | |
| ### edit the file, edit the name, remove any ID references and include the command argument under container spec. |
| print('Happy Engineer\'s Day! 2022') | |
| print('\n'.join | |
| ([''.join | |
| ([('Engineer'[(x-y) % 8] | |
| if ((x*0.05)**2+(y*0.1)**2-1) | |
| ** 3-(x*0.05)**2*(y*0.1) | |
| ** 3 <= 0 else ' ') | |
| for x in range(-30, 30)]) | |
| for y in range(15, -15, -1)])) |
| package main | |
| import ( | |
| "fmt" | |
| "github.com/pbnjay/memory" | |
| ) | |
| func main() { | |
| fmt.Printf("Total system memory: %d GB\n", memory.TotalMemory()/1024/1024/1024) |
| if [ $(cat /etc/os-release | awk -F '=' '/^ID=/ {print $2}' | cut -d '"' -f 2) = "amzn" ]; then | |
| echo "Amazon Linux" | |
| elif [ $(cat /etc/os-release | awk -F '=' '/^ID=/ {print $2}' | cut -d '"' -f 2) = "ubuntu" ]; then | |
| echo "Ubuntu" | |
| else | |
| echo "Unsupported OS" | |
| exit 1 | |
| fi |
A summary of what you need to know for the exam can be found here
IAAS
curl -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token <YOUR_GITHUB_TOKEN>" \
-H "Content-Length: 0" \
-X PUT \
https://api.github.com/orgs/EpicGames/public_members/devenesaws ec2 describe-spot-price-history --start-time 2022-05-11T12:00:00 \
--filters "Name=instance-type,Values='t3.medium','t4g.medium','t3a.medium','t2.medium','c3.large','m4.large'" \
--product-description "Linux/UNIX" --query 'SpotPriceHistory[*].[AvailabilityZone,InstanceType,SpotPrice,Timestamp]' \
--output table --region us-east-1|sort -r +4