Coder Social home page Coder Social logo

rke2-vagrant's Introduction

About

This is a rke2 kubernetes cluster playground wrapped in a Vagrant environment.

Usage

Configure your hosts file with:

10.11.0.100 server.rke2.test
10.11.0.201 example-app.rke2.test

Install the base Ubuntu 22.04 vagrant box.

Install the base Windows 2022 vagrant box.

Launch the environment:

time vagrant up --no-destroy-on-error --no-tty --provider=libvirt

NB The server nodes (e.g. server1) are tainted to prevent them from executing non control-plane workloads. That kind of workload is executed in the agent nodes (e.g. agent1).

Access the cluster from the host:

export KUBECONFIG=$PWD/tmp/admin.conf
kubectl cluster-info
kubectl get nodes -o wide

Access the example application and notice the GOOS property value round-robin between linux and windows:

http://example-app.rke2.test

Kubernetes API

Access the Kubernetes API at:

https://server.rke2.test:6443

NB You must use the client certificate that is inside the tmp/admin.conf, tmp/*.pem, or /etc/rancher/rke2/rke2.yaml (inside the server1 machine) file.

Access the Kubernetes API using the client certificate with httpie:

http \
    --verify tmp/default-ca-crt.pem \
    --cert tmp/default-crt.pem \
    --cert-key tmp/default-key.pem \
    https://server.rke2.test:6443

Or with curl:

curl \
    --cacert tmp/default-ca-crt.pem \
    --cert tmp/default-crt.pem \
    --key tmp/default-key.pem \
    https://server.rke2.test:6443

K9s Dashboard

The K9s console UI dashboard is also installed in the server node. You can access it by running:

vagrant ssh server1
sudo su -l
k9s

References

rke2-vagrant's People

Contributors

rgl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

megian

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.