Vagrant version | Virtualbox version |
---|---|
v2.2.4 | Version 6.0.10 r132072 (Qt5.6.2) |
v2.2.5 | Version 6.0.10 r132072 (Qt5.6.2) |
Version 6.0.10 r132072 (Qt5.9.5) |
- Kubernetes Setup Using Ansible and Vagrant
- Using Vagrant/Ansible to spin up a multi-node kubernetes cluster fails detecting kubelet file
- Intelligent Vagrant and Ansible files
- Kubernetes dashboard
- Install shell completion
- Calico Project
- Helm Charts
- Kubernetes-demo
- wardviaene/kubernetes-course: Kubernetes Course Files
- ricardoandre97/k8s-resources
# Get kubernetes cluster up and ready
$> cd /path/to/Vagrantfile
$> vagrant up
## Accessing master
$> vagrant ssh k8s-master
vagrant@k8s-master:~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
k8s-master Ready master 18m v1.16.3
node-1 Ready <none> 10m v1.16.3
node-2 Ready <none> 2m37s v1.16.3
## Accessing nodes
$> vagrant ssh node-1
$> vagrant ssh node-2
# Remove kubernetes cluster
$> cd /path/to/Vagrantfile
$> vagrant destroy -f
# Get available versions
$> kubectl api-versions
# Get available resources
$> kubectl api-resources
# Get Kubernetes version
$> kubectl version
# Get Kubernetes Namespaces
$> kubectl get namespaces
# Get Kubernetes nodes
$> kubectl get nodes
# Running a single pod
$> kubectl run my-apache --image httpd
# List pods
$> kubectl get pods
# List all objects
$> kubectl get all
# Scaling pods
$> kubectl scale deployment my-apache --replicas 2
# Geting logs
$> kubectl logs deployment/my-apache
# Describing pod
$> kubectl describe pod my-apache-<hash>-<hash>
# See deployment history
$> kubectl roolout history deployment <deployment-name>
# Build and name a new chart
$> helm create <chart-name>
# Test template
$> helm install <chart-name> --debug --dry-run --generate-name
# Deploy template
$> helm install <chart-name> --generate-name
$> helm install <name> <chart-name>
# Delete all charts
$> helm del $(helm ls --all --short)
# Downloading a new chart
$> helm fetch stable/kibana
$> helm fetch stable/kibana --untar
# Listing repositories
$> helm repo list
# Listing available charts in repository
$> helm repo update
$> helm search repo <repo-name>
# Adding new repository
$> helm repo add <helm_repository_name> http://<host>:<port>/repository/<nexus_repository_name>/ --username <username> --password <password>
# Uploading a chart to Nexus3 (https://github.com/sonatype-nexus-community/helm-nexus-push)
$> helm package <chart-name>
$> helm plugin install --version master https://github.com/sonatype-nexus-community/helm-nexus-push.git
$> helm nexus-push <repo> <chart>.tgz --username <username> --password <password>