This file contains hidden or 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 #Which version of the Kubernetes API you're using to create this object | |
kind: Deployment # What kind of object you want to create [deployment, service etc] | |
metadata: # Data that helps uniquely identify the object, including a name string, UID, and optional namespace | |
name: hellogopher | |
namespace: hellogopher | |
spec: # What state you desire for the object | |
selector: # Define what selectors the Deployment uses to find the PODS that are related to it | |
matchLabels: # matchLabels is a map of {key,value} pairs. | |
app: hellogopher | |
replicas: 1 # Tells the deployment to run 1 pod |
This file contains hidden or 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 #Which version of the Kubernetes API you're using to create this object | |
kind: Deployment # What kind of object you want to create [deployment, service etc] | |
metadata: # Data that helps uniquely identify the object, including a name string, UID, and optional namespace | |
name: hellogopher | |
namespace: hellogopher | |
spec: # What state you desire for the object | |
selector: # Define what selectors the Deployment uses to find the PODS that are related to it | |
matchLabels: # matchLabels is a map of {key,value} pairs. | |
app: hellogopher | |
replicas: 1 # Tells the deployment to run 1 pod |
This file contains hidden or 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: v1 | |
kind: Secret | |
metadata: | |
name: database-secrets | |
namespace: hellogopher | |
type: Opaque | |
data: | |
DATABASE_PASSWORD: cGFzc3dvcmQ= |
This file contains hidden or 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: v1 | |
kind: ConfigMap | |
metadata: | |
name: database-configs | |
namespace: hellogopher | |
data: | |
DATABASE_USERNAME: root | |
DATABASE_NAME: test |
This file contains hidden or 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 #Which version of the Kubernetes API you're using to create this object | |
kind: Deployment # What kind of object you want to create [deployment, service etc] | |
metadata: # Data that helps uniquely identify the object, including a name string, UID, and optional namespace | |
name: hellogopher | |
namespace: hellogopher | |
spec: # What state you desire for the object | |
selector: # Define what selectors the Deployment uses to find the PODS that are related to it | |
matchLabels: # matchLabels is a map of {key,value} pairs. | |
app: hellogopher | |
replicas: 1 # Tells the deployment to run 1 pod |
This file contains hidden or 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 #Which version of the Kubernetes API you're using to create this object | |
kind: Deployment # What kind of object you want to create [deployment, service etc] | |
metadata: # Data that helps uniquely identify the object, including a name string, UID, and optional namespace | |
name: hellogopher | |
namespace: hellogopher | |
spec: # What state you desire for the object | |
selector: # Define what selectors the Deployment uses to find the PODS that are related to it | |
matchLabels: # matchLabels is a map of {key,value} pairs. | |
app: hellogopher | |
replicas: 1 # Tells the deployment to run 1 pod |
This file contains hidden or 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
DATABASE_USERNAME=root | |
DATABASE_NAME=test |
This file contains hidden or 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 #Which version of the Kubernetes API you're using to create this object | |
kind: Deployment # What kind of object you want to create [deployment, service etc] | |
metadata: # Data that helps uniquely identify the object, including a name string, UID, and optional namespace | |
name: hellogopher | |
namespace: hellogopher | |
spec: # What state you desire for the object | |
selector: # Define what selectors the Deployment uses to find the PODS that are related to it | |
matchLabels: # matchLabels is a map of {key,value} pairs. | |
app: hellogopher | |
replicas: 1 # Tells the deployment to run 1 pod |
This file contains hidden or 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 #Which version of the Kubernetes API you're using to create this object | |
kind: Deployment # What kind of object you want to create [deployment, service etc] | |
metadata: # Data that helps uniquely identify the object, including a name string, UID, and optional namespace | |
name: hellogopher | |
namespace: hellogopher | |
spec: # What state you desire for the object | |
selector: # Define what selectors the Deployment uses to find the PODS that are related to it | |
matchLabels: # matchLabels is a map of {key,value} pairs. | |
app: hellogopher | |
replicas: 1 # Tells the deployment to run 1 pod |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"time" | |
) |