Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
leandromonaco committed Oct 3, 2023
1 parent 594f95c commit fb2cb2d
Show file tree
Hide file tree
Showing 7 changed files with 230 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .obsidian/bookmarks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"ctime": 1693432923396,
"path": "src/Goals",
"title": "Goals"
},
{
"type": "file",
"ctime": 1696310935338,
"path": "SQL Lite.md"
}
]
}
95 changes: 80 additions & 15 deletions .obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,62 @@
"state": {
"type": "markdown",
"state": {
"file": "src/Goals/Continous Learning.md",
"file": "src/Performance/General.md",
"mode": "source",
"source": false
}
}
},
{
"id": "13fe2dd0c63d9668",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "src/Tools/Docker CLI.md",
"mode": "source",
"source": false
}
}
},
{
"id": "4f18271cec7d1cd7",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "src/APIs/Google Calendar API.md",
"mode": "source",
"source": false
}
}
},
{
"id": "9861b28bb7b19db5",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "SQL Lite.md",
"mode": "source",
"source": false
}
}
},
{
"id": "f5175e44af0185a5",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "src/Tools/Kubernetes.md",
"mode": "source",
"source": false
}
}
}
],
"currentTab": 2
"currentTab": 6
}
],
"direction": "vertical"
Expand Down Expand Up @@ -73,7 +121,7 @@
"state": {
"type": "search",
"state": {
"query": "books",
"query": "kubernetes",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
Expand Down Expand Up @@ -111,7 +159,7 @@
"state": {
"type": "backlink",
"state": {
"file": "src/Goals/Continous Learning.md",
"file": "src/Tools/Kubernetes.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
Expand All @@ -128,7 +176,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "src/Goals/Continous Learning.md",
"file": "src/Tools/Kubernetes.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
Expand All @@ -151,7 +199,17 @@
"state": {
"type": "outline",
"state": {
"file": "src/Goals/Continous Learning.md"
"file": "src/Tools/Kubernetes.md"
}
}
},
{
"id": "71515d3b6eb5f283",
"type": "leaf",
"state": {
"type": "all-properties",
"state": {
"sortOrder": "frequency"
}
}
}
Expand All @@ -172,29 +230,36 @@
"command-palette:Open command palette": false
}
},
"active": "17cc314d6eb2696c",
"active": "f5175e44af0185a5",
"lastOpenFiles": [
"src/Goals/Continous Learning.md",
"SQL Lite.md",
"src/DotNet/EntityFramework.md",
"src/APIs/Google Calendar API.md",
"src/Tools/Kubernetes.md",
"src/Tools/VSCode.md",
"src/Tools/Visual Studio.md",
"src/Tools/Tye.md",
"src/Tools/Docker Desktop.md",
"src/Tools/Docker CLI.md",
"src/Technology/AI.md",
"src/Technology/Architecture.md",
"pasted image 0.png",
"src/Management/Software Development Strategy.md",
"src/Goals/Quality.md",
"books/Kubernetes Learning Path.pdf",
"src/Management/Goals.md",
"Objectives.md",
"src/APIs/Google Calendar API.md",
"src/Tools/Nuget CLI.md",
"src/Development/Development Environment Setup.md",
"src/How-to/CLI.md",
"src/Frontend/CSS.md",
"src/Frontend/Index.md",
"src/Frontend/Angular.md",
"pasted image 0.png",
"src/Certifications/AZ-400 Designing and Implementing Microsoft DevOps Solutions.md",
"src/Cloud/AWS/Index.md",
"src/Cloud/AWS/Tools/AWS CLI.md",
"src/Technology/AI.md",
"src/APIs/QMetry API.md",
"src/APIs/JIRA API.md",
"src/Tools/Git.md",
"src/Performance/General.md",
"src/Management/1on1s.md",
"src/Management/Onboarding.md",
"books/50 Things You Need to Know to Be a Top IT Pro.pdf",
"src/Pasted image 20230810091642.png",
"src/Pasted image 20230731083648.png"
Expand Down
9 changes: 9 additions & 0 deletions SQL Lite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**Winget Package**
`winget install sqlitestudio.pl.SQLiteStudio`

**EF Core Package**
`Microsoft.EntityFrameworkCore.Sqlite`

[[EntityFramework]]

`"Data Source=mydatabase.db"`
4 changes: 2 additions & 2 deletions src/APIs/Google Calendar API.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

- https://www.googleapis.com/calendar/v3/calendars/{UrlEncodedCalendarId}/events?key=[ApiKey]
- https://www.googleapis.com/calendar/v3/calendars/en.australian%23holiday%40group.v.calendar.google.com/events?key=aaSSSyA0Ur2m863-CONQKZJd-tfGRR4FtrtytryrtTRRTY

## Full List of Calendars (Country & Religious)

||\ ['Australian Holidays', 'en.australian#[email protected]'],|
Expand Down Expand Up @@ -98,4 +97,5 @@

## Reference Material

https://stackoverflow.com/questions/30833844/get-holidays-list-of-a-country-from-google-calendar-api
- https://stackoverflow.com/questions/30833844/get-holidays-list-of-a-country-from-google-calendar-api
- https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
3 changes: 1 addition & 2 deletions src/Goals/Continous Learning.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ This a list of ideas to make learning a part the routine.
- [AWS Certified Solutions Architect – Associate](https://aws.amazon.com/certification/certified-solutions-architect-associate/) & [Professional](https://aws.amazon.com/certification/certified-devops-engineer-professional/) | [Ramp-Up Guide](https://d1.awsstatic.com/training-and-certification/ramp-up_guides/Ramp-Up_Guide_Architect.pdf)

[[Continous Learning]]
## Blog Posts
[Kubernetes 101: Pods, Nodes, Containers, and Clusters](https://medium.com/google-cloud/kubernetes-101-pods-nodes-containers-and-clusters-c1509e409e16)

## Videos
TBA
## Training
Expand Down
23 changes: 23 additions & 0 deletions src/Tools/Docker CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,29 @@ https://docs.docker.com/engine/install/
- Remove all containers `docker rm $(docker ps -a -q)`
- Remove all images `docker rmi $(docker images -q)`

### docker init [Example of selecting ASP.NET](https://docs.docker.com/engine/reference/commandline/init/#example-of-selecting-aspnet)

The following example shows the prompts that appear after selecting `ASP.NET` and example input. The ASP.NET template also creates a `README.Docker.md` file with additional information about building and deploying your application.

```console
? What application platform does your project use? ASP.NET
? What's the name of your solution's main project? myapp
? What version of .NET do you want to use? 6.0
? What local port do you want to use to access your server? 8000

CREATED: .dockerignore
CREATED: Dockerfile
CREATED: compose.yaml
CREATED: README.Docker.md

✔ Your Docker files are ready!

Take a moment to review them and tailor them to your application.

When you're ready, start your application by running: docker compose up --build

Your application will be available at http://localhost:8000
```
### Tags

- #Docker
Expand Down
110 changes: 110 additions & 0 deletions src/Tools/Kubernetes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
`winget install Kubernetes.kubectl`

- Clusters -> Nodes -> PODs -> 1 or more containers
- Controllers (Job / CronJob)
- Worker
- Ingress Controller (Nginx)

## Update Kube File
`aws eks update-kubeconfig --name au-sandbox --region ap-southeast-2`

## Kubernetes API
`kubectl api-resources`

## Namespaces
`kubectl create namespace leandrom`
`kubectl delete namespace leandrom`
`kubectl get namespaces`

## POD
https://kubernetes.io/docs/concepts/workloads/pods/
`kubectl apply -n leandrom -f hello-world.yml`
`kubectl apply -f hello-world.yml`
`kubectl get pods -n leandrom`
`kubectl describe pod hello-world -n leandrom`
`kubectl logs hello-world -n leandrom`
`kubectl delete pod hello-world -n leandrom`

`hello-world.yml`
```
apiVersion: v1
kind: Pod
metadata:
name: hello-world
namespace: leandrom
spec:
restartPolicy: Always
containers:
- name: main
image: busybox
command: ['sh', '-c', 'echo $MESSAGE && sleep 10 && echo Bye!']
env:
- name: MESSAGE
value: "Hello env vars!"
```
### Restart Policy
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy

The `spec` of a Pod has a `restartPolicy` field with possible values `Always`, `OnFailure`, and `Never`. The default value is Always.

## Controllers
### Jobs
`kubectl get job -n leandrom`
`kubectl delete job hellojob -n leandrom`

```
apiVersion: batch/v1
kind: Job
metadata:
name: hellojob
namespace: leandrom
spec:
completions: 20
parallelism: 2
template:
metadata:
name: hello-job
spec:
containers:
- name: main
image: busybox
command: ['sh', '-c', 'echo $MESSAGE && sleep 10 && echo Bye!']
env:
- name: MESSAGE
value: "Hello env vars!"
restartPolicy: OnFailure
```

### Cron Jobs

```
apiVersion: batch/v1
kind: CronJob
metadata:
name: hellocron
namespace: leandrom
spec:
schedule: "* * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: main
image: busybox
command: ['sh', '-c', 'echo $MESSAGE && sleep 10 && echo Bye!']
env:
- name: MESSAGE
value: "Hello env vars!"
restartPolicy: OnFailure
```
## Export/Import Resources
`kubectl get namespace leandrom -o yaml`
`kubectl get pod debian -n leandrom -o yaml`
`kubectl apply -f namespace.yaml`
`kubectl apply -f pod.yaml`


## References

[Kubernetes 101: Pods, Nodes, Containers, and Clusters](https://medium.com/google-cloud/kubernetes-101-pods-nodes-containers-and-clusters-c1509e409e16)

0 comments on commit fb2cb2d

Please sign in to comment.