Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions k8s-1/runnig_pod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,24 @@

microk8s.kubectl port-forward --address 0.0.0.0 kuard 8080:8080

microk8s.kubectl exec kuard date
microk8s.kubectl exec kuard -- date

microk8s.kubectl exec -it kuard ash
microk8s.kubectl exec -it kuard -- ash

microk8s.kubectl cp <pod-name>:/captures/capture3.txt ./capture3.txt

microk8s.kubectl cp $HOME/config.txt <pod-name>:/config.txt

== Cleanup ==
kubectl delete pods kuard

==Pod with health check==

microk8s.kubectl create -f kuard-pod-health.yaml

# Details of the restart can be found with kubectl describe kuard.
kubectl port-forward --address 0.0.0.0 pod/kuard 8080:8080

# Details of the restart can be found with kubectl describe pod/kuard.

# Kubernetes also supports tcpSocket health checks that
# open a TCP socket; if the connection is successful, the probe succeeds. This style of
Expand Down
27 changes: 27 additions & 0 deletions k8s-1/service-discovery/deployment-bandicoot-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: bandicoot-prod
labels:
ver: "2"
app: bandicoot
env: prod
spec:
selector:
matchLabels:
ver: "2"
app: bandicoot
env: prod
replicas: 2
template:
metadata:
labels:
ver: "2"
app: bandicoot
env: prod
spec:
containers:
- name: kuard
image: gcr.io/kuar-demo/kuard-amd64:2
ports:
- containerPort: 8080