Skip to content

Instantly share code, notes, and snippets.

View trisberg's full-sized avatar

Thomas Risberg trisberg

View GitHub Profile

Build

Add a Dockerfile to the directory with the jar file:

Dockerfile

# syntax=docker/dockerfile:1

FROM eclipse-temurin:17-jdk-jammy
---
# Flux version: v0.27.0
# Components: source-controller
apiVersion: v1
kind: Namespace
metadata:
labels:
app.kubernetes.io/instance: flux-system
app.kubernetes.io/part-of: flux
pod-security.kubernetes.io/warn: restricted
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: weatherforecast-steeltoe
annotations:
"backstage.io/kubernetes-label-selector": "app.kubernetes.io/part-of=weatherforecast-steeltoe"
spec:
type: service
lifecycle: experimental
owner: default-team
name: kubernetes-skaffold
displayName: Spring Kubernetes Deployment using Skaffold
description: Deploy a Spring Boot application using kustomize, off-the-shell kustomizations, and deploy using skaffold.
iconUrl: https://icon-library.com/images/rick-sanchez-icon/rick-sanchez-icon-24.jpg
maintainer: mpollack@vmware.com
version: 1.0.0
tags: skaffold, kubernetes, spring
commands: |-
k8s new
k8s update
@trisberg
trisberg / local-registry.md
Last active January 26, 2024 17:47
Using a Local Registry with Minikube

Using a Local Registry with Minikube

Install a local Registry

These instructions include running a local registry accessible from Kubernetes as well as from the host development machine at registry.dev.svc.cluster.local:5000.

  1. Use the docker CLI to run the registry:2 container from Docker, listening on port 5000, and persisting images in the ~/.registry/storage directory.
---
# Source: postgresql/templates/secrets.yaml
apiVersion: v1
kind: Secret
metadata:
name: test-postgresql
labels:
app: postgresql
chart: postgresql-8.9.6
release: "test"

Installing Spring Cloud Data Flow with Ingress support

Using the latest 2.5.0.RELEASE version of the Helm Chart for Spring Cloud Data Flow.

Software prerequisites

Have the following installed:

@trisberg
trisberg / minikube-scdf-ops.md
Last active April 30, 2020 15:52
Minikube and spring-cloud-dataflow-ops setup

Minikube and spring-cloud-dataflow-ops setup

Create Minikube instance

minikube start --cpus=4 --memory=8192

Add metallb loadbalancer

@trisberg
trisberg / scdf-install-notes.md
Last active April 27, 2020 21:30
SCDF Install Notes

SCDF Install Notes

Create GKE cluster

cloud container clusters create spring-test \
  --cluster-version=latest \
  --machine-type=n1-standard-2 \
  --enable-autoscaling --min-nodes=1 --max-nodes=3 \
  --enable-autorepair \
@trisberg
trisberg / knative-install-notes.md
Last active April 20, 2020 15:51
Knative Installation Notes

Knative Installation Notes

Installing Knative 0.14.0

Serving

kubectl apply -f https://github.com/knative/serving/releases/download/v0.14.0/serving-crds.yaml