Last active
April 14, 2022 13:10
-
-
Save ivankovnatsky/0ab56f4c92be2f28e22e5aef5642c803 to your computer and use it in GitHub Desktop.
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
apt update | |
apt install htop -y | |
apt install dnsutils -y | |
apt install docker -y | |
apt install jq -y | |
apt install kubetail -y | |
apt install neovim -y | |
apt install tmux -y | |
curl -sfL https://get.k3s.io | sh - | |
curl -sS https://webinstall.dev/k9s | bash | |
cat > deployment.yaml << EOF | |
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: db1000n | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: db1000n | |
namespace: db1000n | |
labels: | |
app: db1000n | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: db1000n | |
template: | |
metadata: | |
labels: | |
app: db1000n | |
spec: | |
containers: | |
- name: db1000n | |
image: ghcr.io/arriven/db1000n:latest | |
args: ["-enable-self-update"] | |
imagePullPolicy: Always | |
resources: | |
requests: | |
memory: "512Mi" | |
cpu: "500m" | |
limits: | |
memory: "2048Mi" | |
cpu: "2" | |
env: | |
- name: ENABLE_PRIMITIVE | |
value: "false" | |
resources: | |
requests: | |
memory: "512Mi" | |
cpu: "500m" | |
limits: | |
memory: "2048Mi" | |
cpu: "2" | |
--- | |
apiVersion: autoscaling/v2beta2 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: db1000n | |
namespace: db1000n | |
labels: | |
app: db1000n | |
spec: | |
scaleTargetRef: | |
apiVersion: apps/v1 | |
kind: Deployment | |
name: db1000n | |
minReplicas: 1 | |
maxReplicas: 100 | |
metrics: | |
- type: Resource | |
resource: | |
name: cpu | |
target: | |
type: Utilization | |
averageUtilization: 80 | |
EOF | |
kubectl apply -f deployment.yaml | |
.local/opt/k9s-v0.25.18/bin/k9s --kubeconfig /etc/rancher/k3s/k3s.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment