Skip to content

Instantly share code, notes, and snippets.

View ccollicutt's full-sized avatar

curtis ccollicutt

View GitHub Profile
@ccollicutt
ccollicutt / gist:8952af816a77b872b137977b98386e9c
Created August 23, 2023 11:23
Don't build a container image, just mount your app as a configmap!
apiVersion: v1
kind: ConfigMap
metadata:
name: hello-world-configmap
data:
hello.py: |
import logging
import time
import signal
import sys
set -euo pipefail
# Note that yq must be version above or equal to version 4.9.2 and below version 5.
# Processing TKG BOM file tkg-bom-v1.5.3.yaml
imgpkg copy -i projects.registry.vmware.com/tkg/tkg-bom:v1.5.3 --to-repo 10.0.26.249/tkg-1-5-3/tkg-bom --registry-ca-cert-path /tmp/cacrtbase64d.crt
imgpkg copy -i projects.registry.vmware.com/tkg/cluster-api/mic:v1.8.0_vmware.1 --to-repo 10.0.26.249/tkg-1-5-3/cluster-api/mic --registry-ca-cert-path /tmp/cacrtbase64d.crt
imgpkg copy -i projects.registry.vmware.com/tkg/cluster-api/nmi:v1.8.0_vmware.1 --to-repo 10.0.26.249/tkg-1-5-3/cluster-api/nmi --registry-ca-cert-path /tmp/cacrtbase64d.crt
@ccollicutt
ccollicutt / http-echo-deployment-service-ingress.yaml
Created January 7, 2022 16:33
Quick ingress test yaml with http echo.
apiVersion: v1
kind: Service
metadata:
name: http-echo
spec:
ports:
- port: 80
targetPort: 5678
selector:
app: http-echo
---
resources:
- name: spring-petclinic-testing-branch
type: git
source:
uri: ((spring-petclinic-repo-uri))
icon: github
branch: testing
@ccollicutt
ccollicutt / ISTIO 1.4 on PKS with PSPs.md
Created December 6, 2019 18:42 — forked from svrc/ISTIO 1.4 on PKS with PSPs.md
Installing Istio 1.4 on PKS with restrictive Pod Security Policy

What does this GIST do or not do

  1. Shows you how to use Istio 1.4 on Kubernetes 1.14+ with a modicum of runtime security for your workloads.
  2. Specifically it installs Istio with CNI support, and allows the use of restrictive PodSecurityPolicies for your workloads.
  3. It is designed for VMware PKS, but doesn't require it ... (just change the CNI bin dir and excluded namespaces in values-cni.yml, also swap the ClusterRole pks-privileged and pks-restricted mentioned throughout these files with your own PSP roles).
  4. It doesn't fix the need for Istio itself to run as root, but that should be fixed in a future Istio release as it's already fixed in trunk.

Prerequisites

  1. You are logged into your cluster as a cluster admin, K8s 1.14 at least
#| WAN (gateway) Configuration:
#| gateway: ether1 (renamed with extension '-gateway');
#| firewall: enabled;
#| NAT: enabled;
#| DHCP Client: enabled;
#|
#| LAN Configuration:
#| LAN Port: bridge-local;
#| switch group: ether6 (master), ether7, ether8, ether9, ether10
#| (renamed with extensions '-master-local' and '-slave-local')
root@kata:~/go/src/github.com/kata-containers/runtime# git log --format=%h -1 HEAD
5f7fcd7
root@kata:~/go/src/github.com/kata-containers/runtime# uname -a
Linux kata 4.4.0-134-generic #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
root@kata:~/go/src/github.com/kata-containers/runtime# make test
TEST go-test
WARNING: Already running as root so will not re-run tests as non-root user.
WARNING: As a result, only a subset of tests will be run
WARNING: (run this script as a non-privileged to ensure all tests are run).
INFO: Currently running as user 'root'
@ccollicutt
ccollicutt / kubedingdong.md
Created September 27, 2018 18:59 — forked from herpiko/kubedingdong.md
Kubernetes notes for CKA exam preparation 💪

This notes applied to Kubernetes version 1.9.1-00 on Ubuntu Xenial.

Basic concept

TO BE WRITTEN

Installation and starting up 🏁

Installation

  • Swap should be disabled (see /etc/fstab)
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-dep
labels:
tier: frontend
annotations:
AppVersion: "3.4"
spec:
replicas: 2
@ccollicutt
ccollicutt / kubernetes_commands.md
Created September 26, 2018 17:24 — forked from edsiper/kubernetes_commands.md
Kubernetes Useful Commands