Ubuntu 16.04
/etc/systemd/system/certbot.service
[Unit]
Description=Let's Encrypt renewal
[Service]
Type=oneshot
ExecStart=/usr/bin/certbot renew --quiet --agree-tos
# SETUP HAPROXY SEBAGAI INGRESS-NGINX HARUS MENGGUNAKAN MODE TCP. | |
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners | |
stats timeout 30s | |
user haproxy | |
group haproxy |
--- | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: nfs-pv | |
spec: | |
capacity: | |
storage: 1Gi | |
accessModes: | |
- ReadWriteMany |
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/release-8.0/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml | |
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/release-8.0/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml | |
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/release-8.0/client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml |
#!/bin/bash | |
# Log file | |
LOG="/var/log/k8s_install.log" | |
echo "Starting Kubernetes components installation at $(date)" | tee -a $LOG | |
# Load required kernel modules | |
echo "Loading kernel modules" | tee -a $LOG | |
cat <<EOF | tee /etc/modules-load.d/k8s.conf |
#!/bin/bash | |
# Log file | |
LOG="/var/log/install_script.log" | |
echo "Starting installation script at $(date)" | tee -a $LOG | |
# Docker Installation | |
echo "Starting Docker installation" | tee -a $LOG |
{{ define "mailbody" }} | |
{{ range . }} | |
{{ if gt (len .Annotations) 0 }} | |
{{.Annotations.summary}} | |
{{ end }} | |
{{ range .Labels.SortedPairs }} | |
{{ end }} | |
{{ end }}{{ end }} | |
{{ define "mailsubject" }} | |
{{ with .Alerts.Firing }}🔥 [Alerting]{{ template "mailbody" . }} |
Ubuntu 16.04
/etc/systemd/system/certbot.service
[Unit]
Description=Let's Encrypt renewal
[Service]
Type=oneshot
ExecStart=/usr/bin/certbot renew --quiet --agree-tos
#!/bin/sh | |
# Backup your data | |
# Use at your own risk | |
# Usage ./extended-cleanup-rancher2.sh | |
# Include clearing all iptables: ./extended-cleanup-rancher2.sh flush | |
docker rm -f $(docker ps -qa) | |
docker rmi -f $(docker images -q) | |
docker volume rm $(docker volume ls -q) | |
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done | |
cleanupdirs="/etc/ceph /etc/cni /etc/kubernetes /opt/cni /opt/rke /run/secrets/kubernetes.io /run/calico /run/flannel /var/lib/calico /var/lib/etcd /var/lib/cni /var/lib/kubelet /var/lib/rancher/rke/log /var/log/containers /var/log/pods /var/run/calico" |
#!/bin/bash | |
# Step 1 | |
curl -LO https://dl.k8s.io/release/`curl -LS https://dl.k8s.io/release/stable.txt`/bin/linux/amd64/kubectl | |
# Step 2 | |
chmod +x ./kubectl | |
# Step 3 | |
sudo mv ./kubectl /usr/local/bin/kubectl |
#!/bin/bash | |
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf | |
overlay | |
br_netfilter | |
EOF | |
sudo modprobe overlay | |
sudo modprobe br_netfilter |