Deploying the First Release
Learn how to deploy our first release to get started with namespaces.
We'll cover the following...
Looking into the definition
We’ll start by deploying the go-demo-2
application and use it to explore namespaces. The file is shown below:
Press + to interact
apiVersion: networking.k8s.io/v1kind: Ingressmetadata:name: go-demo-2annotations:kubernetes.io/ingress.class: "nginx"ingress.kubernetes.io/ssl-redirect: "false"nginx.ingress.kubernetes.io/ssl-redirect: "false"spec:rules:- host: go-demo-2.comhttp:paths:- path: /demopathType: ImplementationSpecificbackend:service:name: go-demo-2-apiport:number: 8080---apiVersion: apps/v1kind: Deploymentmetadata:name: go-demo-2-dbspec:selector:matchLabels:type: dbservice: go-demo-2strategy:type: Recreatetemplate:metadata:labels:type: dbservice: go-demo-2vendor: MongoLabsspec:containers:- name: dbimage: mongo:3.3---apiVersion: v1kind: Servicemetadata:name: go-demo-2-dbspec:ports:- port: 27017selector:type: dbservice: go-demo-2---apiVersion: apps/v1kind: Deploymentmetadata:name: go-demo-2-apispec:replicas: 3selector:matchLabels:type: apiservice: go-demo-2template:metadata:labels:type: apiservice: go-demo-2language: gospec:containers:- name: apiimage: vfarcic/go-demo-2env:- name: DBvalue: go-demo-2-dbreadinessProbe:httpGet:path: /demo/helloport: 8080periodSeconds: 1livenessProbe:httpGet:path: /demo/helloport: 8080---apiVersion: v1kind: Servicemetadata:name: go-demo-2-apispec:ports:- port: 8080selector:type: apiservice: go-demo-2
The definition is the same as the one we used before, so we’ll skip the explanation of the YAML file. Instead, we’ll jump right away into the deployment.
Altering the definition
Unlike previous cases, we’ll deploy a specific tag of the ...
Access this course and 1400+ top-rated courses and projects.