mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
k8s
This commit is contained in:
parent
04b9870255
commit
a8664272e9
@ -33,5 +33,14 @@ Let's take a look how to monitor application code using Prometheus.
|
|||||||
|
|
||||||
See the [Prometheus Monitoring](./prometheus-monitoring/readme.md) readme guide for detailed steps
|
See the [Prometheus Monitoring](./prometheus-monitoring/readme.md) readme guide for detailed steps
|
||||||
|
|
||||||
|
## Kubernetes Development Basics
|
||||||
|
|
||||||
|
See the [Kubernetes Guide](./kubernetes/readme.md) readme guide for detailed steps
|
||||||
|
|
||||||
|
Part #1 Kubernetes Getting Started on Windows <br/>
|
||||||
|
Video: https://youtu.be/8h4FoWK7tIA <br/>
|
||||||
|
|
||||||
|
Part #2 Kubernetes kubectl | the basics <br/>
|
||||||
|
Video: https://youtu.be/feLpGydQVio <br/>
|
||||||
|
|
||||||
More details coming soon!
|
More details coming soon!
|
||||||
|
35
kubernetes/deployments/deployment.yaml
Normal file
35
kubernetes/deployments/deployment.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: example-deploy
|
||||||
|
labels:
|
||||||
|
app: example-app
|
||||||
|
annotations:
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: example-app
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: "docker-registry"
|
||||||
|
containers:
|
||||||
|
- name: example-app
|
||||||
|
image: aimvector/example-app
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /status
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 3
|
||||||
|
periodSeconds: 3
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: "50m"
|
||||||
|
limits:
|
||||||
|
memory: "256Mi"
|
||||||
|
cpu: "500m"
|
26
kubernetes/deployments/readme.md
Normal file
26
kubernetes/deployments/readme.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Deployments
|
||||||
|
|
||||||
|
Build an example app:
|
||||||
|
|
||||||
|
```
|
||||||
|
# Important!
|
||||||
|
# make sure you are at root of the repository
|
||||||
|
# in your terminal
|
||||||
|
|
||||||
|
# you can choose which app you want to build!
|
||||||
|
|
||||||
|
|
||||||
|
# aimvector/golang:1.0.0
|
||||||
|
docker-compose build golang
|
||||||
|
|
||||||
|
|
||||||
|
# aimvector/csharp:1.0.0
|
||||||
|
docker-compose build csharp
|
||||||
|
|
||||||
|
# aimvector/nodejs:1.0.0
|
||||||
|
docker-compose build nodejs
|
||||||
|
|
||||||
|
# aimvector/python:1.0.0
|
||||||
|
docker-compose build python
|
||||||
|
|
||||||
|
```
|
62
kubernetes/kubectl.md
Normal file
62
kubernetes/kubectl.md
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
|
||||||
|
VIDEO : https://youtu.be/feLpGydQVio
|
||||||
|
|
||||||
|
## Configs
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl config
|
||||||
|
|
||||||
|
#${HOME}/.kube/config
|
||||||
|
#kubectl config --kubeconfig="C:\someotherfolder\config"
|
||||||
|
#$KUBECONFIG
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### contexts
|
||||||
|
|
||||||
|
```
|
||||||
|
#get the current context
|
||||||
|
kubectl config current-context
|
||||||
|
|
||||||
|
#get and set contexts
|
||||||
|
kubectl config get-contexts
|
||||||
|
kubectl config use-context
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## GET commands
|
||||||
|
```
|
||||||
|
kubectl get <resource>
|
||||||
|
|
||||||
|
#examples
|
||||||
|
kubectl get pods
|
||||||
|
kubectl get deployments
|
||||||
|
kubectl get services
|
||||||
|
kubectl get configmaps
|
||||||
|
kubectl get secrets
|
||||||
|
kubectl get ingress
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Namespaces
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl get namespaces
|
||||||
|
kubectl create namespace test
|
||||||
|
kubectl get pods -n test
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Describe command
|
||||||
|
|
||||||
|
Used to troubleshoot states and statuses of objects
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl describe <resource> <name>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Version
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl version
|
||||||
|
```
|
7
kubernetes/readme.md
Normal file
7
kubernetes/readme.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Kubernetes Development Series
|
||||||
|
|
||||||
|
## KUBECTL Basics Video
|
||||||
|
|
||||||
|
Checkout [kubectl](./kubectl.md) for detailed steps
|
||||||
|
|
||||||
|
## Deployments
|
Loading…
x
Reference in New Issue
Block a user