Skip to content

Instantly share code, notes, and snippets.

# Nejjednodussi konfigurace pro rozchozeni Spring Cloud Kubernetes
# POZNAMKA: TOHLE NENI SPRAVNY ZPUSOB RESENI, ALE FUNGUJE
# Pro hrani si se Spring Cloud Kubernetes (pro dev) to je ale dostacujici reseni
# https://stackoverflow.com/questions/47973570/kubernetes-log-user-systemserviceaccountdefaultdefault-cannot-get-services
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: fabric8-rbac
subjects:
apiVersion: v1
kind: Service
metadata:
name: external-seico
spec:
ports:
- name: http
port: 80
- name: https
port: 443
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myingress
labels:
name: myingress
spec:
rules:
- host: nginx.example.com
http:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 1
selector:
matchLabels:
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
app: nginx
spec:
selector:
app: nginx
ports:
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
selector:
app: nginx
ports:
- name: http
port: 80
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
type: LoadBalancer
# type: NodePort
selector:
app: nginx
ports:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
Poznámka: Všechny soubory budou ve stejném adresáři
==================
docker-compose.yml:
==================
version: '3.7'
services:
elastic:
image: elasticsearch:7.3.0
@jirkapinkas
jirkapinkas / gist:f7bdaca557280af436d8f577eedd53fb
Created October 26, 2017 04:58
Priklad na funkcionalni programovani v Java 8
// mejme 2 tridy:
public class Results {
private String result1, result2, result3;
public void setResult1(String result1) {
this.result1 = result1;
}