GithubHelp home page GithubHelp logo

isabella232 / snap-kubernetes-worker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from charmed-kubernetes/snap-kubernetes-worker

0.0 0.0 0.0 91 KB

A complete Kubernetes worker

License: Apache License 2.0

Shell 100.00%

snap-kubernetes-worker's Introduction

Kubernetes worker Snap package

This is currently a work in progress.

Installing

Install via snap.

sudo snap install kubernetes-worker

This will install the latest version of Kubernetes. If you would like to use an older version, you can see the available options.

snap info kubernetes-worker

An example of installing an older version.

sudo snap install kubernetes-worker --channel 1.14/stable

After installation, we will need to connect the remaining interfaces.

sudo snap connect kubernetes-worker:kernel-module-control

Configuration

kubeconfig

We must feed in a kubeconfig file to allow the worker to enrol with the cluster.

Example:

sudo snap set kubernetes-worker kubeconfig="$(cat ~/.kube/config)"

cacert

We also need to feed in a ca.cert to allow Kubernetes to get data from the kubelet.

Example:

sudo snap set kubernetes-worker cacert="$(cat ~/ca.crt)"

Commands

ctr

Access the underlying containerd CLI. Must be used with sudo.

Example:

sudo kubernetes-worker.ctr --namespace=k8s.io containers ls

kubectl

Run the Kubernetes CLI within the context of the Snap.

Example:

kubernetes-worker.kubectl get all --all-namespaces

Developer Notes

When building with snapcraft, due to the snap using core18, the build will take place within a multipass container. We need to up the default memory for this container, otherwise the build will fail. We can do this with the following command.

SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=8G snapcraft

We can also add cores to make the build faster.

SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=8G SNAPCRAFT_BUILD_ENVIRONMENT_CPU=8 snapcraft

Install the built snap.

sudo snap install ./kubernetes-worker_*.snap --dangerous

Connect all the interfaces.

for i in docker-privileged k8s-kubelet dot-kube docker-support firewall-control hardware-observe kernel-module-control mount-observe network-control process-control system-observe opengl; do sudo snap connect kubernetes-worker:$i; done

Cloud Providers

We are adding support for different cloud providers. Supported providers are listed below.

EKS

For instructions on deploying to EKS, see the Using with EKS wiki page.

snap-kubernetes-worker's People

Contributors

joedborg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.