This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.istio.io/v1alpha3 | |
kind: Gateway | |
metadata: | |
name: bookinfo-gateway | |
spec: | |
selector: | |
istio: ingressgateway # use istio default controller | |
servers: | |
- port: | |
number: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Version JDK8 | |
FROM centos:7 | |
MAINTAINER Gaurav Agarwal, bharatmicrosystems@gmail.com | |
RUN yum install -y java-1.8.0-openjdk-devel wget git maven | |
# Create users and groups | |
RUN groupadd tomcat | |
RUN mkdir /opt/tomcat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubectl apply -f - <<EOF | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-v1 | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubectl apply -f - <<EOF | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-v2 | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubectl apply -f - <<EOF | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx | |
labels: | |
app: nginx | |
spec: | |
ports: | |
- name: http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubectl apply -f - <<EOF | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: sleep | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: sleep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubectl apply -f - <<EOF | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: kube-dns | |
namespace: kube-system | |
data: | |
stubDomains: | | |
{"global": ["$(kubectl get svc -n istio-system istiocoredns -o jsonpath={.spec.clusterIP})"]} | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vim middleware-netpol.yaml | |
apiVersion: networking.k8s.io/v1 | |
kind: NetworkPolicy | |
metadata: | |
name: middlware-network-policy | |
namespace: middleware | |
spec: | |
podSelector: {} | |
policyTypes: | |
- Ingress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: kaniko | |
spec: | |
template: | |
spec: | |
containers: | |
- name: kaniko | |
image: gcr.io/kaniko-project/executor:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
namespace: web | |
annotations: | |
fluxcd.io/automated: "true" | |
spec: | |
selector: |