forked from bregman-arie/devops-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In addition to a couple of k8s questions.
- Loading branch information
abregman
committed
Oct 16, 2022
1 parent
64e6614
commit ad66a50
Showing
9 changed files
with
307 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Circle CI | ||
|
||
## Circle CI Questions | ||
|
||
### Circle CI 101 | ||
|
||
<details> | ||
<summary>What is Circle CI?</summary><br><b> | ||
|
||
[Circle CI](https://circleci.com): "CircleCI is a continuous integration and continuous delivery platform that can be used to implement DevOps practices." | ||
</b></details> | ||
|
||
<details> | ||
<summary>What are some benefits of Circle CI?</summary><br><b> | ||
|
||
[Circle CI Docs](https://circleci.com/docs/about-circleci): "SSH into any job to debug your build issues. | ||
Set up parallelism in your .circleci/config.yml file to run jobs faster. | ||
Configure caching with two simple keys to reuse data from previous jobs in your workflow. | ||
Configure self-hosted runners for unique platform support. | ||
Access Arm resources for the machine executor. | ||
Use orbs, reusable packages of configuration, to integrate with third parties. | ||
Use pre-built Docker images in a variety of languages. | ||
Use the API | ||
to retrieve information about jobs and workflows. | ||
Use the CLI to access advanced tools locally. | ||
Get flaky test detection with test insights." | ||
</b></details> | ||
|
||
|
||
<details> | ||
<summary>What is an Orb?</summary><br><b> | ||
|
||
[Circle CI Docs](https://circleci.com/developer/orbs): "Orbs are shareable packages of CircleCI configuration you can use to simplify your builds" | ||
|
||
They can come from the public registry or defined privately as part of an organization. | ||
</b></details> | ||
|
||
### Circle CI Hands-On 101 | ||
|
||
<details> | ||
<summary>Where (in what location in the project) Circle CI pipelines are defined?</summary><br><b> | ||
|
||
`.circleci/config.yml` | ||
</b></details> |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Node Selectors | ||
|
||
## Objectives | ||
|
||
1. Apply the label "hw=max" on one of the nodes in your cluster | ||
2. Create and run a Pod called `some-pod` with the image `redis` and configure it to use the selector `hw=max` | ||
3. Explain why node selectors might be limited | ||
|
||
|
||
## Solution | ||
|
||
Click [here](solution.md) to view the solution |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Node Selectors | ||
|
||
## Objectives | ||
|
||
1. Apply the label "hw=max" on one of the nodes in your cluster | ||
2. Create and run a Pod called `some-pod` with the image `redis` and configure it to use the selector `hw=max` | ||
3. Explain why node selectors might be limited | ||
|
||
|
||
## Solution | ||
|
||
Click [here](solution.md) to view the solution | ||
|
||
1. `kubectl label nodes some-node hw=max` | ||
2. | ||
|
||
``` | ||
kubectl run some-pod --image=redis --dry-run=client -o yaml > pod.yaml | ||
vi pod.yaml | ||
spec: | ||
nodeSelector: | ||
hw: max | ||
kubectl apply -f pod.yaml | ||
``` | ||
|
||
3. Assume you would like to run your Pod on all the nodes with with either `hw` set to max or to min, instead of just max. This is not possible with nodeSelectors which are quite simplified and this is where you might want to consider `node affinity`. |
This file contains 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
Oops, something went wrong.