Skip to content

Instantly share code, notes, and snippets.

root@ip-172-31-12-201:/home/ubuntu# /snap/kubelet/340/kubelet --help
Usage of /snap/kubelet/340/kubelet:
--address 0.0.0.0 The IP address for the Kubelet to serve on (set to 0.0.0.0 for all IPv4 interfaces and `::` for all IPv6 interfaces) (default 0.0.0.0)
--allow-privileged If true, allow containers to request privileged mode.
--alsologtostderr log to standard error as well as files
--anonymous-auth Enables anonymous requests to the Kubelet server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of system:anonymous, and a group name of system:una
@ktsakalozos
ktsakalozos / gist:415518c873c721b85749e92b8b1ef822
Created April 20, 2018 07:32
Scripts for ASP.NET delivery to K8s
mkdir -p ~/workspace/dotnet
cd ~/workspace/dotnet
dotnet new razor -o HelloWorldAspNetCore
cd HelloWorldAspNetCore
dotnet run
dotnet publish -c Release
cd ~/workspace/dotnet/HelloWorldAspNetCore/
cat ./Dockerfile
@ktsakalozos
ktsakalozos / ports.csv
Last active February 15, 2019 12:44
Table with Ports
Por Service Access Restrictions
16443 API server SSL encrypted. Clients need to present a valid password from a Static Password File.
10250 kubelet Anonymous authentication is disabled. X509 client certificate is required.
10255 kubelet Read only port for the Kubelet.
random kube-proxy One random port per hosted service is opened as we use --proxy-mode=userspace for compatibility reasons.
HTTPS_PROXY=http://squid.internal:3128
NO_PROXY="registry.jujucharms.com, .xip.io"
apiVersion: v1
kind: ServiceAccount
metadata:
name: nfs-provisioner-dev
---
apiVersion: v1
kind: Service
metadata:
labels:
test.service: slow-file-storage-nfs-dev
@ktsakalozos
ktsakalozos / traefik-ds.yaml
Created May 22, 2019 18:32
traefik deployment for MicroK8s
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller
namespace: kube-system
---
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
@ktsakalozos
ktsakalozos / refresh-certs.sh
Last active October 9, 2023 01:47
Refresh MicroK8s Certs
#!/bin/bash
set -eu
export SNAP_NAME="microk8s"
export SNAP_DATA="/var/snap/microk8s/current/"
export SNAP="/snap/microk8s/current/"
export PATH="$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH"
source $SNAP/actions/common/utils.sh
@ktsakalozos
ktsakalozos / gist:0791a68baec91970cb32fb90422599d1
Created April 4, 2022 08:43
MicroK8s status with core addons
$ sudo microk8s.status --wait-ready
microk8s is running
high-availability: no
datastore master nodes: 127.0.0.1:19001
datastore standby nodes: none
addons:
enabled:
ha-cluster # (core) Configure high availability on the current node
disabled:
community # (core) The community addons repository
$ sudo microk8s.enable community
Infer repository core for addon community
Cloning into '/var/snap/microk8s/common/addons/community'...
done.
Community repository is now enabled
$ sudo microk8s.status
microk8s is running
high-availability: no
datastore master nodes: 127.0.0.1:19001
datastore standby nodes: none
@ktsakalozos
ktsakalozos / gist:6a665d7253bf41ce74ceb4185d2563ce
Last active April 4, 2022 09:26
Tree structure of the addons repository
$ tree /var/snap/microk8s/common/addons/core
/var/snap/microk8s/common/addons/core
├── addons
│   ├── community
│   │   ├── disable
│   │   └── enable
│   ├── dashboard
│   │   ├── dashboard.yaml
│   │   ├── disable
│   │   └── enable