-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
594f95c
commit fb2cb2d
Showing
7 changed files
with
230 additions
and
19 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
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,9 @@ | ||
**Winget Package** | ||
`winget install sqlitestudio.pl.SQLiteStudio` | ||
|
||
**EF Core Package** | ||
`Microsoft.EntityFrameworkCore.Sqlite` | ||
|
||
[[EntityFramework]] | ||
|
||
`"Data Source=mydatabase.db"` |
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 |
---|---|---|
|
@@ -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]'],| | ||
|
@@ -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 |
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,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) |