Skip to content

Instantly share code, notes, and snippets.

View Piotr1215's full-sized avatar
🐺

Piotr Zaniewski Piotr1215

🐺
View GitHub Profile
@Piotr1215
Piotr1215 / .hyper.js
Created November 16, 2019 11:01
Hyper config
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',

kubectl commands and tips&tricks for CKA, CKAD and CKS exams

Quickly retrieve imperative commands to create k8s resources.

Command: k run -h | grep '# ' -A2

When is it useful: copy/paste command to notepad, edit values and execute to create desired resource

Result: list of different ways to create k8s resources imperatively using kubectl

@Piotr1215
Piotr1215 / k8s-bookmarks-CKA-CKAD.html
Last active August 15, 2024 16:04
K8s bookmarks for CKA, CKAD and CKS exams
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1626629115" LAST_MODIFIED="1626629462" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3>
<DL><p>

Kubernetes related networking commands

Coming from .NET dev/architect background means that there is a lot to learn in terms of networking and Linux management. Here are CKA curriculum requirements for networking:

RedHat ip command cheatsheet

CKA exam related commands:

ip commands

FROM ubuntu:18.10
WORKDIR /root
COPY bootstrap.sh ./
RUN apt-get update && apt-get -y install --no-install-recommends \
gnupg \
curl \
wget \
#!/bin/bash
echo 'Bootstrap steps start here:'
echo '[STEP 1] Creating directory for kubectl config'
mkdir /root/.kube
echo '[STEP 2] Installing k9s awesomeness'
(
set -x &&
wget -c https://github.com/derailed/k9s/releases/download/v0.13.4/k9s_0.13.4_Linux_x86_64.tar.gz -O - | tar -xz &&
version: '2'
services:
kubectl-host:
image: piotrzan/kubectl-comp
container_name: kubectl-host
tty: true
network_mode: "host"
volumes:
- ~/.kube/:/root/.kube/
name: Deploy to Netlify
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
name: Deploying to Netlify
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app
COPY . ./
RUN pwa-
FROM nginx:alpine
WORKDIR /var/www/web
COPY --from=build-env /app/output/wwwroot .
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
IMAGE?=piotrzan/blazorindocker
.PHONY: run
default: run
run:
docker run --rm -it -p 5010:80 -e ASPNETCORE_ENVIRONMENT=Development --name blazor-pwa $(IMAGE)