Created
March 5, 2019 17:34
-
-
Save azyobuzin/4183406000a2c608d0b00f0401ff663b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
[Unit] | |
Description=Lightweight Kubernetes | |
Documentation=https://k3s.io | |
After=network.target k3s-env.service | |
Requires=k3s-env.service | |
[Service] | |
ExecStartPre=-/sbin/modprobe br_netfilter | |
ExecStartPre=-/sbin/modprobe overlay | |
Environment="K3S_TOKEN=とーくん" | |
EnvironmentFile=/run/k3senv | |
ExecStart=/usr/local/bin/k3s agent | |
KillMode=process | |
Delegate=yes | |
LimitNOFILE=infinity | |
LimitNPROC=infinity | |
LimitCORE=infinity | |
TasksMax=infinity | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or 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
[Unit] | |
Description=Create /run/k3senv | |
After=local-fs.target network.target nss-lookup.target | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/sh -c "echo \"K3S_URL=https://$(getent hosts k8stest.local | cut -d ' ' -f 1):6443\" > /run/k3senv" | |
RemainAfterExit=yes |
This file contains hidden or 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
[Unit] | |
Description=Lightweight Kubernetes | |
Documentation=https://k3s.io | |
After=network.target | |
[Service] | |
ExecStartPre=-/sbin/modprobe br_netfilter | |
ExecStartPre=-/sbin/modprobe overlay | |
ExecStart=/usr/local/bin/k3s server | |
KillMode=process | |
Delegate=yes | |
LimitNOFILE=infinity | |
LimitNPROC=infinity | |
LimitCORE=infinity | |
TasksMax=infinity | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment