mirror of https://github.com/k3s-io/k3s
Enable CPU and Memory accounting on vagrant
parent
ff07195f4e
commit
6090bc9112
|
@ -64,6 +64,7 @@ done
|
|||
echo "127.0.0.1 localhost" >> /etc/hosts # enables cmds like 'kubectl get pods' on master.
|
||||
echo "$MASTER_IP $MASTER_NAME" >> /etc/hosts
|
||||
|
||||
enable-accounting
|
||||
prepare-package-manager
|
||||
|
||||
# Configure the master network
|
||||
|
|
|
@ -59,6 +59,7 @@ for (( i=0; i<${#NODE_NAMES[@]}; i++)); do
|
|||
fi
|
||||
done
|
||||
|
||||
enable-accounting
|
||||
prepare-package-manager
|
||||
|
||||
# Configure network
|
||||
|
|
|
@ -14,6 +14,16 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
function enable-accounting() {
|
||||
mkdir -p /etc/systemd/system.conf.d/
|
||||
cat <<EOF >/etc/systemd/system.conf.d/kubernetes-accounting.conf
|
||||
[Manager]
|
||||
DefaultCPUAccounting=yes
|
||||
DefaultMemoryAccounting=yes
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
}
|
||||
|
||||
function prepare-package-manager() {
|
||||
echo "Prepare package manager"
|
||||
|
||||
|
|
Loading…
Reference in New Issue