From a624512e98314ea1a745d42d35dbc736301fcd27 Mon Sep 17 00:00:00 2001 From: liorbenami <58229008+liorbenami1@users.noreply.github.com> Date: Wed, 30 Dec 2020 10:36:17 +0200 Subject: [PATCH 1/2] Update README.md Syntax deprecation fixes (user '--' before a command) Cleanup - delete kuard pod before creating new one with health check Port-forward - in order to browse to the kuard-health dashboard --- k8s-1/runnig_pod/README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/k8s-1/runnig_pod/README.md b/k8s-1/runnig_pod/README.md index 0f1de7a..55c3745 100644 --- a/k8s-1/runnig_pod/README.md +++ b/k8s-1/runnig_pod/README.md @@ -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 :/captures/capture3.txt ./capture3.txt microk8s.kubectl cp $HOME/config.txt :/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 From a8204fa42416fac65febdd20b8c81c957605377d Mon Sep 17 00:00:00 2001 From: vagrant Date: Thu, 14 Jan 2021 19:38:24 +0000 Subject: [PATCH 2/2] create deployment bandicoot prod --- .../deployment-bandicoot-prod.yaml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 k8s-1/service-discovery/deployment-bandicoot-prod.yaml diff --git a/k8s-1/service-discovery/deployment-bandicoot-prod.yaml b/k8s-1/service-discovery/deployment-bandicoot-prod.yaml new file mode 100644 index 0000000..c50508b --- /dev/null +++ b/k8s-1/service-discovery/deployment-bandicoot-prod.yaml @@ -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