Kubernetes: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:
# '''K3s:'''  Kubernetes environment for a low spec machine that uses fewer resources
# '''K3s:'''  Kubernetes environment for a low spec machine that uses fewer resources


==Knowledge==
==Minikube==
<source lang="powershell">
Get-ComputerInfo OsName,OsVersion,OsBuildNumber
choco install docker-desktop -y
choco install minikube -y
 
minikube start
minikube delete
minikube start --v=7
kubectl get nodes
</source>
 
==Kind==
<source lang="powershell">
<source lang="powershell">
choco -v
choco install kubernetes-cli -y
wsl -l -v
choco install kind -y
wsl --list --verbose
kind create cluster
Restart-Service LxssManager
kubectl cluster-info --context kind-kind
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
</source>
</source>


==K3s==
<source lang="powershell">
<source lang="powershell">
choco install multipass -y
choco install multipass -y
Line 30: Line 42:
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -"
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -"
multipass exec node1 -- sudo kubectl get nodes
multipass exec node1 -- sudo kubectl get nodes
</source>
==Knowledge==
<source lang="powershell">
choco -v
wsl -l -v
wsl --list --verbose
Restart-Service LxssManager
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
</source>
</source>



Revision as of 00:47, 13 June 2021

Preferred Kubernetes environments are Minikube, Kind and K3s. It's depends on your use case.

  1. Minikube: Getting started with Fully Kubernetes environment
  2. Kind: Kubernetes environment for clusters and more than a single node
  3. K3s: Kubernetes environment for a low spec machine that uses fewer resources

Minikube

Get-ComputerInfo OsName,OsVersion,OsBuildNumber
choco install docker-desktop -y
choco install minikube -y

minikube start
minikube delete
minikube start --v=7
kubectl get nodes

Kind

choco install kubernetes-cli -y
choco install kind -y
kind create cluster
kubectl cluster-info --context kind-kind

K3s

choco install multipass -y
multipass launch -n node1
multipass list

multipass set local.driver=hyperv
multipass set local.driver=virtualbox

Get-NetConnectionProfile
Set-NetConnectionProfile -InterfaceIndex 13 -NetworkCategory Private

multipass list
cat C:\Windows\System32\drivers\etc\hosts.ics

multipass delete --purge --all
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -"
multipass exec node1 -- sudo kubectl get nodes

Knowledge

choco -v
wsl -l -v
wsl --list --verbose
Restart-Service LxssManager
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V

References