Skip to content

Instantly share code, notes, and snippets.

Reyhan Sofian reyhansofian

Block or report user

Report or block reyhansofian

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View result-patch-replicas.yaml
apiVersion: v1
kind: Service
metadata:
name: hello-world-service
spec:
ports:
- name: public
port: 80
targetPort: 80
type: NodePort
View kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../base
patchesStrategicMerge:
- patch-replicas.yaml
View patch-replicas.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world-deployment
spec:
replicas: 3
View kustomize-base-build-result.yaml
apiVersion: v1
kind: Service
metadata:
name: hello-world-service
spec:
ports:
- name: public
port: 80
targetPort: 80
type: NodePort
View service.yaml
apiVersion: v1
kind: Service
metadata:
name: hello-world-service
spec:
type: NodePort
ports:
- name: public
port: 80
targetPort: 80
View deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world-deployment
spec:
replicas: 1
template:
spec:
containers:
- name: hello-world-deployment
View kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
View root-kustomize
hello-world/
├── base
│ ├── deployment.yaml
│ ├── kustomization.yaml
│ └── service.yaml
└── overlays
├── prod
│ ├── kustomization.yaml
│ └── patch.yaml
└── staging
@reyhansofian
reyhansofian / k8s.yaml
Created Feb 24, 2019
Kubernetes manifest using configmap reload container
View k8s.yaml
apiVersion: v1
kind: Service
metadata:
labels:
test-app: test
name: test
namespace: default
spec:
externalTrafficPolicy: Cluster
ports:
@reyhansofian
reyhansofian / app.js
Last active Feb 24, 2019
Application server using configmap reload
View app.js
// @ts-check
const express = require("express");
const app = express();
const fs = require("fs");
const bodyParser = require('body-parser');
const mountPath = "/etc/config";
const configMapFile = "..data";
You can’t perform that action at this time.