Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab 15 kubernetes #69

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions 15-Kubernetes/ecr/custom-deployment-lab71.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: custom-deployment
name: custom-deployment
spec:
replicas: 5
selector:
matchLabels:
app: custom-deployment
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: custom-deployment
spec:
containers:
- image: 324320755747.dkr.ecr.us-east-1.amazonaws.com/desmond-kubernetes:latest
name: custom-deployment
ports:
- containerPort: 3000
env:
- name: REACT_APP_BG_COLOR
value: "#ffffff"
resources: {}
status: {}
29 changes: 29 additions & 0 deletions 15-Kubernetes/ecr/custom-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: custom-deployment
name: custom-deployment
spec:
replicas: 1
selector:
matchLabels:
app: custom-deployment
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: custom-deployment
spec:
containers:
- image: 324320755747.dkr.ecr.us-east-1.amazonaws.com/desmond-kubernetes:latest
name: custom-deployment
ports:
- containerPort: 3000
env:
- name: REACT_APP_BG_COLOR
value: "#094679"
resources: {}
status: {}
17 changes: 17 additions & 0 deletions 15-Kubernetes/ecr/custom-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: custom-deployment
name: custom-service
spec:
ports:
- port: 3000
protocol: TCP
targetPort: 3000
selector:
app: custom-deployment
type: LoadBalancer
status:
loadBalancer: {}
3 changes: 2 additions & 1 deletion 15-Kubernetes/ecr/ecr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Description: "Kubernetes ECR Repository"
Parameters:
Prefix:
Type: String
Default: desmond
Description: ECR Repostory Prefix

Resources:
Expand Down Expand Up @@ -34,4 +35,4 @@ Resources:
Outputs:
ECRRepoName:
Value: !Ref KubernetesECR
Description: ECR Repository Name
Description: ECR Repository Name
103 changes: 103 additions & 0 deletions 15-Kubernetes/eksctl/busybox-pod-definition-lab-22.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
apiVersion: v1
kind: Pod
metadata:
annotations:
kubernetes.io/psp: eks.privileged
creationTimestamp: "2022-10-21T13:19:40Z"
labels:
run: busybox
name: busybox
namespace: default
resourceVersion: "2840"
uid: 5852d2df-225d-4470-83f5-6ce2bb784cd4
spec:
containers:
- args:
- sleep
- "3000"
image: busybox:latest
imagePullPolicy: Always
name: busybox
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: kube-api-access-4fqq2
readOnly: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
nodeName: ip-192-168-50-198.ec2.internal
preemptionPolicy: PreemptLowerPriority
priority: 0
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
volumes:
- name: kube-api-access-4fqq2
projected:
defaultMode: 420
sources:
- serviceAccountToken:
expirationSeconds: 3607
path: token
- configMap:
items:
- key: ca.crt
path: ca.crt
name: kube-root-ca.crt
- downwardAPI:
items:
- fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
path: namespace
status:
conditions:
- lastProbeTime: null
lastTransitionTime: "2022-10-21T13:19:40Z"
status: "True"
type: Initialized
- lastProbeTime: null
lastTransitionTime: "2022-10-21T13:19:42Z"
status: "True"
type: Ready
- lastProbeTime: null
lastTransitionTime: "2022-10-21T13:19:42Z"
status: "True"
type: ContainersReady
- lastProbeTime: null
lastTransitionTime: "2022-10-21T13:19:40Z"
status: "True"
type: PodScheduled
containerStatuses:
- containerID: docker://248455dfecdaff499c1829b3e717843d2a1368a8438c082958f7008d0e06c6ed
image: busybox:latest
imageID: docker-pullable://busybox@sha256:9810966b5f712084ea05bf28fc8ba2c8fb110baa2531a10e2da52c1efc504698
lastState: {}
name: busybox
ready: true
restartCount: 0
started: true
state:
running:
startedAt: "2022-10-21T13:19:42Z"
hostIP: 192.168.50.198
phase: Running
podIP: 192.168.55.137
podIPs:
- ip: 192.168.55.137
qosClass: BestEffort
startTime: "2022-10-21T13:19:40Z"
69 changes: 69 additions & 0 deletions 15-Kubernetes/eksctl/busybox-pod-definition-lab-23.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
apiVersion: v1
kind: Pod
metadata:
annotations:
kubernetes.io/psp: eks.privileged
creationTimestamp: "2022-10-21T13:29:30Z"
labels:
run: busybox
name: busybox
namespace: default
resourceVersion: "4314"
uid: 44802981-6c85-411b-ab6f-2c96f8ad2330
spec:
containers:
- args:
- ' --dry-run'
- sleep
- "3000"
image: busybox:latest
imagePullPolicy: Always
name: busybox
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: kube-api-access-k7564
readOnly: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
preemptionPolicy: PreemptLowerPriority
priority: 0
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
volumes:
- name: kube-api-access-k7564
projected:
defaultMode: 420
sources:
- serviceAccountToken:
expirationSeconds: 3607
path: token
- configMap:
items:
- key: ca.crt
path: ca.crt
name: kube-root-ca.crt
- downwardAPI:
items:
- fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
path: namespace
status:
phase: Pending
qosClass: BestEffort
2 changes: 1 addition & 1 deletion 15-Kubernetes/eksctl/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
name: stelligent-u-cluster
name: desmond-cluster
region: us-east-1
# availabilityZones: ["us-east-1a", "us-east-1b"]

Expand Down
67 changes: 67 additions & 0 deletions 15-Kubernetes/eksctl/nginx-deployment-lab32.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
apiVersion: v1
kind: Pod
metadata:
annotations:
kubernetes.io/psp: eks.privileged
creationTimestamp: "2022-10-21T13:39:46Z"
labels:
run: nginx-deployment
name: nginx-deployment
namespace: default
resourceVersion: "5936"
uid: f6814e25-59d8-4170-b736-e2cf339e5196
spec:
containers:
- args:
- ' --dry-run'
image: nginx:latest
imagePullPolicy: Always
name: nginx-deployment
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: kube-api-access-g6vfp
readOnly: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
preemptionPolicy: PreemptLowerPriority
priority: 0
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
volumes:
- name: kube-api-access-g6vfp
projected:
defaultMode: 420
sources:
- serviceAccountToken:
expirationSeconds: 3607
path: token
- configMap:
items:
- key: ca.crt
path: ca.crt
name: kube-root-ca.crt
- downwardAPI:
items:
- fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
path: namespace
status:
phase: Pending
qosClass: BestEffort
24 changes: 24 additions & 0 deletions 15-Kubernetes/eksctl/nginx-deployment-lab33.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: nginx-deployment
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx-deployment
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: nginx-deployment
spec:
containers:
- image: nginx:latest
name: nginx
resources: {}
status: {}
24 changes: 24 additions & 0 deletions 15-Kubernetes/eksctl/nginx-deployment-lab41.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: nginx-deployment
name: nginx-deployment
spec:
replicas: 10
selector:
matchLabels:
app: nginx-deployment
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: nginx-deployment
spec:
containers:
- image: nginx:alpine
name: nginx
resources: {}
status: {}