This is More than a MicroK8s GitHub Action

This is More than a MicroK8s GitHub Action

There is now a MicroK8s GitHub action meant to be used to CI your project. You may have heard of MicroK8s by now; the “smallest, simplest, pure production Kubernetes for clusters, laptops, IoT and Edge”

You may have heard of MicroK8s by now; the “smallest, simplest, pure production Kubernetes for clusters, laptops, IoT and Edge” you can install with a single command:

sudo snap install microk8s --classic

There is now a MicroK8s GitHub action meant to be used to CI your project. Let’s see how to make use of it.

Your simple-project to CI

The toy project we have contains a single deployment manifest:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80

On every pull request we would like to kubectl apply this deployment and make sure nginx is still responsive. To do that we create a file under .github/workflows/ with the following contents:

name: Test Microk8s
on:
  pull_request:
    branches: [ master ]
jobs:
  test:
    runs-on: ubuntu-latest
    name: Install MicroK8s
    steps:
    - uses: balchua/[email protected]
      with:
        channel: 'latest/stable'
    - name: Checkout
      uses: actions/[email protected]
    - name: Test nginx
      id: Nginx
      run: |
        set -ex
        kubectl apply -f ${{ github.workspace }}/deploy/nginx.yaml
        kubectl expose deployment nginx-deployment --name nginx-srv2 --cluster-ip=10.152.183.210
        kubectl rollout status deployment/nginx-deployment
        curl 10.152.183.210 | grep nginx

github kubernetes developer

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

50+ Useful Kubernetes Tools for 2020 - Part 2

Our original Kubernetes tool list was so popular that we've curated another great list of tools to help you improve your functionality with the platform.

How long does it take to develop/build an app?

This article covers A-Z about the mobile and web app development process and answers your question on how long does it take to develop/build an app.

Developer Career Path: To Become a Team Lead or Stay a Developer?

For a developer, becoming a team leader can be a trap or open up opportunities for creating software. Two years ago, when I was a developer, ... by Oleg Sklyarov, Fullstack Developer at Skyeng company

How to Compare Multiple GitHub Projects with Our GitHub Stats tool

In this article we are going to compare three most popular machine learning projects for you.

Offshore Software Development - Best Practices

To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.