-
Create a multi-container Pod with a sidecar logging container that tails logs from the main app container.
multi container pod can be created only by usingYAML or JSON formatted configuration file.
kubectl create -f FILE
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
Questions are not from any actual exam!!! | |
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: |
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
1. Worker node is connected but doesn't have any role defined. | |
``` | |
kubectl label node k8s-node1 node-role.kubernetes.io/worker=worker | |
``` |
- Create a namespace called 'mynamespace' and a pod with image nginx called nginx on this namespace
- Create the pod that was just described using YAML
- Create a busybox pod (using kubectl command) that runs the command "env". Run it and see the output
- Create a busybox pod (using YAML) that runs the command "env". Run it and see the output
- Get the YAML for a new namespace called 'myns' without creating it
- Create the YAML for a new ResourceQuota called 'myrq' with hard limits of 1 CPU, 1G memory and 2 pods without creating it
- Get pods on all namespaces
- Create a pod with image nginx called nginx and expose traffic on port 80
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
https://www.reddit.com/r/kubernetes/comments/ssxhsd/cleared_my_cka_exam_with_a_score_of_92_here_are_a/?chainedPosts=t3_rzpu5i |
So, you're a hobbyist or maybe even a user in a small-scale business capacity and you have some kind of headless Linux (or other *nix) box, maybe it's a VPS or a Raspberry Pi, and you want it to be able to email you with alerts (setting up monitoring is a separate subject!)
I went round in circles with this for a while, because it seemed like such a
1.a. Find windows system path on windows terminal Run path command on any cmd prompt and this should print the path output, tested on windows 10
D:\> path
1.b. Find and temporarily modify windows system path on powershell windows 10
PS D:\> $env:Path
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
Based on the latest comment https://github.com/microsoft/vscode/issues/68167 I have modified JerryGoyal's answer so we don't have to modify bindings: | |
Put the following at the top of your Microsoft.PowerShell_profile.ps1 config file (type $profile in the terminal to find it, you might have to create one if it doesn't exist already) | |
```PowerShell_profile | |
if ($env:TERM_PROGRAM -eq "vscode") { | |
Set-PSReadLineOption -EditMode Emacs | |
} | |
This works for me (vscode 1.43) |
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
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left) | |
// https://gist.github.com/JamieMason/7580315 | |
// | |
// 1. Go to https://twitter.com/YOUR_USER_NAME/following | |
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac) | |
// 3. Paste this into the Developer Console and run it | |
// | |
// Last Updated: 09 April 2020 | |
(() => { | |
const $followButtons = '[data-testid$="-unfollow"]'; |
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
jekyll on different port | |
jekyll serve --port 4001 --host my_hostname_or_ip | |
affilaite theme for jekyll | |
https://github.com/omps/affiliates-jekyll-theme |
NewerOlder