Skip to content

Instantly share code, notes, and snippets.

View Zhbert's full-sized avatar

Konstantin Nezhbert Zhbert

View GitHub Profile
~ % task          
No matches.
@Zhbert
Zhbert / hello.sh
Created March 22, 2022 12:37
New hello.sh
#!/bin/sh
RESPONSE="Say hello one more time!"
while true; do
printf "HTTP/1.1 200 OK\n\n$RESPONSE\n" | ncat -lp 8000
done
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
werf-first-app-559d4f59b-j5ffv 1/1 Running 0 3h24m
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
werf-first-app-559d4f59b-2fth5 1/1 Running 0 7m12s
werf-first-app-559d4f59b-7jqnv 1/1 Running 0 7m12s
werf-first-app-559d4f59b-j5ffv 1/1 Running 0 3h17m
werf-first-app-559d4f59b-n9n64 1/1 Running 0 7m12s
@Zhbert
Zhbert / deployment.yaml
Last active March 22, 2022 12:40
Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: werf-first-app
spec:
# Changing the number of replicas to 4
replicas: 4
selector:
matchLabels:
app: werf-first-app
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
werf-first-app-559d4f59b-j5ffv 1/1 Running 0 175m
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
werf-first-app-559d4f59b-j5ffv 1/1 Running 0 172m
werf-first-app-559d4f59b-l4wxp 1/1 Running 0 10s
werf-first-app-559d4f59b-xrnxn 1/1 Running 0 10s
werf-first-app-559d4f59b-z48qm 1/1 Running 0 10s
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
werf-first-app-559d4f59b-j5ffv 1/1 Running 0 146m
│ │ app/dockerfile Successfully built 558e6bf23bb7
│ │ app/dockerfile Successfully tagged 96c8cfca-d7db-4bf0-8351-cbdc0777c5b5:latest
│ │ ┌ Store stage into .../werf-first-app
│ │ └ Store stage into .../werf-first-app (16.85 seconds)
│ ├ Info
│ │ name: .../werf-first-app:11b3f1b95dd6a39a9473a34ba0615c513d799be7e67e48a2deeed05c-1638438736538
│ │ id: 558e6bf23bb7
│ │ created: 2021-12-02 12:52:16 +0300 MSK
│ │ size: 3.0 MiB
│ └ Building stage app/dockerfile (31.61 seconds)
@Zhbert
Zhbert / Ingress.yaml
Created March 22, 2022 12:27
Ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
name: werf-first-app
spec:
rules:
- host: werf-first-app.test
http: