microk8s-cluster-agent

command module
v0.0.0-...-664ceaa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

MicroK8s cluster agent

This repository contains the code of the cluster agent service used in MicroK8s.

Development Environment

The microk8s cluster agent requires Go. Install Go with:

sudo snap install go --classic

Run all tests with:

make go.fmt go.lint go.test go.vet go.staticcheck

Build

make cluster-agent
./cluster-agent --help

Testing with live MicroK8s instance

MicroK8s running on local machine
cd cluster-agent
sudo snap download microk8s --basename=microk8s
sudo unsquashfs ./microk8s.snap
sudo chown -R 1000: squashfs-root
sudo sed 's,$SNAP/bin/cluster-agent,go run '"$PWD"',' -i squashfs-root/run-cluster-agent-with-args

# development iteration
sudo snap restart microk8s.daemon-cluster-agent
MicroK8s running on remote machine
export [email protected]

ssh $HOST '
    sudo snap download microk8s --basename=microk8s
    sudo unsquashfs microk8s.snap
    sudo chown -R 1000: squashfs-root
    sudo snap try ./squashfs-root
'

# development iteration
go build .
ssh $HOST 'sudo snap stop microk8s.daemon-cluster-agent'
scp ./microk8s-cluster-agent $HOST:squashfs-root/bin/cluster-agent
ssh $HOST 'sudo snap start microk8s.daemon-cluster-agent'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
tools module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL