-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ Replicasets: higher-level abstraction over pods
A ReplicaSet in Kubernetes is a higher-level abstraction over pods that ensures a specified number of replicas of a pod are running at any given time. In simple terms, a ReplicaSet ensures that a certain number of identical pod instances are running, and if any of those instances fail or are terminated, the ReplicaSet will create new ones to maintain the desired count.
- Loading branch information
1 parent
c461c7f
commit 1a75e1b
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
deploy-from-scratch: | ||
$(MAKE) create-kind-cluster | ||
$(MAKE) apply-k8s | ||
|
||
create-kind-cluster: | ||
kind create cluster --config kind-config.yaml --name $(NAMESPACE) | ||
kind export kubeconfig --name $(NAMESPACE) | ||
|
||
apply-k8s: | ||
kubectl apply -f k8s | ||
|
||
delete-k8s: | ||
kubectl delete -f k8s |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: k8s-fundamentals |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: apps/v1 | ||
kind: ReplicaSet | ||
metadata: | ||
name: go-http-app-replicaset | ||
labels: | ||
app: go-http-app | ||
tier: backend | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
tier: backend | ||
template: | ||
metadata: | ||
labels: | ||
tier: backend | ||
spec: | ||
containers: | ||
- name: go-http-app | ||
image: wesleywillians/hello-go:latest | ||
|