Last active
March 20, 2021 14:01
-
-
Save saiyam1814/7b4f5e9d6024bed53c731aa56efaad95 to your computer and use it in GitHub Desktop.
Kubernetes application deployment
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
Kind cluster create | |
https://kind.sigs.k8s.io/docs/user/quick-start/ | |
kind create cluster --name=demo --kubeconfig=/Users/saiyampathak/config | |
kind delete cluster --name=demo | |
=========================================================================== | |
K3s Kubernetes | |
curl -sfL https://get.k3s.io | sh - | |
kubectl create deployment test --image=saiyam911/ketch-cd:v2 | |
kubectl expose deployment test --port=8080 --type=NodePort | |
=========================================== | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: demo | |
name: test2 | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: demo | |
template: | |
metadata: | |
labels: | |
app: demo | |
spec: | |
containers: | |
- image: saiyam911/ketch-cd:v2 | |
name: bash | |
===================================== | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
creationTimestamp: null | |
labels: | |
app: demo | |
name: test2 | |
spec: | |
ports: | |
- port: 8080 | |
protocol: TCP | |
targetPort: 8080 | |
selector: | |
app: demo | |
type: NodePort | |
status: | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment