Skip to content

Instantly share code, notes, and snippets.

@jait
jait / gist-embed-style.css
Created March 29, 2019 07:38
k3s-blog / gist css
.gist{color:#333;
/*!
* GitHub Light v0.4.1
* Copyright (c) 2012 - 2017 GitHub, Inc.
* Licensed under MIT (https://github.com/primer/github-syntax-theme-generator/blob/master/LICENSE)
*/direction:ltr;font-size:16px;text-align:left}.gist .markdown-body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:16px;line-height:1.5;word-wrap:break-word}.gist .markdown-body:before{content:"";display:table}.gist .markdown-body:after{clear:both;content:"";display:table}.gist .markdown-body>:first-child{margin-top:0!important}.gist .markdown-body>:last-child{margin-bottom:0!important}.gist .markdown-body a:not([href]){color:inherit;text-decoration:none}.gist .markdown-body .absent{color:#cb2431}.gist .markdown-body .anchor{float:left;line-height:1;margin-left:-20px;padding-right:4px}.gist .markdown-body .anchor:focus{outline:none}.gist .markdown-body blockquote,.gist .markdown-body details,.gist .markdown-body dl,.gist .markdow
@jait
jait / gist:94f829c2fe415b5e3cea7e682a481680
Last active March 28, 2019 12:16
k3s-blog / kube-nodes
root@k3s-server:~# kubectl get nodes
NAME STATUS ROLES AGE VERSION
k3s-node1 Ready <none> 40s v1.13.4-k3s.1
k3s-server Ready <none> 108s v1.13.4-k3s.1
@jait
jait / deploy-token-secret.yaml
Created March 25, 2019 09:21
k3s-blog / deploy-token-secret.yaml
imagePullSecrets:
- name: deploycred
containers:
- name: myapp
image: gitlab.mycompany.com:4567/my/project/my-app-arm:latest
@jait
jait / .gitlab-ci.yml
Created March 25, 2019 09:19
k3s-blog / .gitlab-ci.yml
image: docker:stable
stages:
- build
- release
variables:
DOCKER_DRIVER: overlay2
CONTAINER_TEST_IMAGE: ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-arm:${CI_COMMIT_REF_SLUG}
CONTAINER_RELEASE_IMAGE: ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-arm:latest
cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
curl -sfL https://get.k3s.io | sh -
curl -sfL https://get.k3s.io | K3S_TOKEN=<token_from_server> K3S_URL=https://<server_ip>:6443 sh -
docker run --rm --privileged multiarch/qemu-user-static:register --reset
docker run --rm --privileged multiarch/qemu-user-static:register --reset
docker build -t my-custom-image-arm . -f Dockerfile.arm
@jait
jait / Dockerfile
Created March 25, 2019 09:02
k3s-blog / Dockerfile.arm
FROM arm32v7/alpine:latest
COPY --from=biarms/qemu-bin /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
# commands to build your app go here…
# e.g. RUN apk add --update <pkgs that you need…>
@jait
jait / raspian-boot-cmdline.txt
Created March 25, 2019 08:32
k3s-blog / raspbian-boot-cmdline.txt
cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
@jait
jait / gist-embed-style.css
Created March 25, 2019 08:27
Gist embed style
.gist .gist-file .gist-meta {
display: none !important;
}
td.js-line-number {
display: none !important;
}
@jait
jait / service-lb-example.yaml
Created March 25, 2019 08:17
k3s-blog / service-lb-example.yaml
apiVersion: v1
kind: Service
metadata:
name: my-web-app
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
@jait
jait / metallb-config.yaml
Created March 25, 2019 08:03
k3s-blog / metallb_config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: company-office
protocol: layer2