-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bad8730
commit 497ec39
Showing
62 changed files
with
152 additions
and
16,502 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
This file was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,77 +1,58 @@ | ||
# Installing commandline tools | ||
|
||
## Windows | ||
|
||
### Choco | ||
|
||
Install/download the CLIs. | ||
|
||
```powershell | ||
choco install kind | ||
choco install base64 | ||
choco install mkcert | ||
choco install kubernetes-cli | ||
choco install kubernetes-helm | ||
choco install linkerd2 | ||
choco install k3d | ||
``` | ||
|
||
### Installing the argoCD CLI | ||
|
||
Follow the [guide](https://argoproj.github.io/argo-cd/cli_installation/) | ||
|
||
```powershell | ||
$version = (Invoke-RestMethod https://api.github.com/repos/argoproj/argo-cd/releases/latest).tag_name | ||
$url = "https://github.com/argoproj/argo-cd/releases/download/" + $version + "/argocd-windows-amd64.exe" | ||
$output = "argocd.exe" | ||
Invoke-WebRequest -Uri $url -OutFile $output | ||
``` | ||
|
||
For 2.0.3 an env variable needs to be set holding the name of the executable. This is missing from the docs. | ||
|
||
```powershell | ||
$env:ARGOCD_BINARY_NAME = 'argocd' | ||
``` | ||
|
||
Now move `argocd.exe` to a location in your PATH. | ||
|
||
## Linux/WSL | ||
|
||
```bash | ||
sudo apt-get update | ||
sudo apt-get install -y apt-transport-https ca-certificates curl wget libnss3-tools cl-base64 | ||
|
||
# kind (if needed) | ||
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64 | ||
chmod +x ./kind | ||
mv ./kind /usr/local/bin/kind | ||
|
||
# mkcert (if needed) | ||
wget -O mkcert https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64 | ||
sudo mv mkcert-v1.4.3-linux-amd64 /usr/local/bin/mkcert | ||
sudo chmod +x /usr/local/bin/mkcert | ||
|
||
# kubctl | ||
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list | ||
sudo apt-get update | ||
sudo apt-get install -y kubectl | ||
|
||
# helm | ||
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add - | ||
sudo apt-get install apt-transport-https --yes | ||
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list | ||
sudo apt-get update | ||
sudo apt-get install helm | ||
|
||
# argocd (if needed) | ||
sudo curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 | ||
sudo chmod +x /usr/local/bin/argocd | ||
|
||
#linkerd | ||
curl -sL https://run.linkerd.io/install | sh | ||
export PATH=$PATH:~/.linkerd2/bin | ||
|
||
#k3d (if needed) | ||
wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash | ||
``` | ||
=== "Windows" | ||
|
||
```powershell | ||
choco install kind | ||
choco install base64 | ||
choco install mkcert | ||
choco install kubernetes-cli | ||
choco install kubernetes-helm | ||
choco install linkerd2 | ||
choco install k3d | ||
choco install argocd-cli | ||
choco install terraform | ||
``` | ||
|
||
=== "Linux" | ||
|
||
```bash | ||
sudo apt-get update | ||
sudo apt-get install -y apt-transport-https ca-certificates curl wget libnss3-tools cl-base64 | ||
|
||
# kind (if needed) | ||
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64 | ||
chmod +x ./kind | ||
mv ./kind /usr/local/bin/kind | ||
|
||
# mkcert (if needed) | ||
wget -O mkcert https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64 | ||
sudo mv mkcert-v1.4.3-linux-amd64 /usr/local/bin/mkcert | ||
sudo chmod +x /usr/local/bin/mkcert | ||
|
||
# kubctl | ||
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list | ||
sudo apt-get update | ||
sudo apt-get install -y kubectl | ||
|
||
# helm | ||
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add - | ||
sudo apt-get install apt-transport-https --yes | ||
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list | ||
sudo apt-get update | ||
sudo apt-get install helm | ||
|
||
# argocd (if needed) | ||
sudo curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 | ||
sudo chmod +x /usr/local/bin/argocd | ||
|
||
#linkerd | ||
curl -sL https://run.linkerd.io/install | sh | ||
export PATH=$PATH:~/.linkerd2/bin | ||
|
||
#k3d (if needed) | ||
wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash | ||
``` |
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 |
---|---|---|
@@ -1,47 +1,53 @@ | ||
<!-- markdownlint-disable MD046 --> | ||
# K3D | ||
|
||
## K3D installation | ||
|
||
### K3D CLI installation | ||
|
||
On Windows: | ||
=== "Windows" | ||
|
||
```Powershell | ||
choco install k3d | ||
``` | ||
```Powershell | ||
choco install k3d | ||
``` | ||
|
||
On linux: | ||
=== "Linux" | ||
|
||
```bash | ||
wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash | ||
``` | ||
```bash | ||
wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash | ||
``` | ||
|
||
### Creating a cluster with terraform | ||
|
||
Edit `terraform.tfvars` to your needs. Then run `terraform apply` to create the cluster. | ||
Edit `terraform.tfvars` to your needs. By default it will create a 3-node cluster on a custom `Docker` network. Then run to create the cluster, run: | ||
|
||
```shell | ||
cd ./src/clusters/k3d | ||
terraform init | ||
terraform apply --auto-approve | ||
``` | ||
|
||
When using WSL2 (Windows Subsystem for Linux), you need to copy the context configuration to your .kubeconfig file on the WSL2 home directory or the other way round, depending on which shell you use to run the terraform code. | ||
!!! Note | ||
When using `WSL2` (Windows Subsystem for Linux), you need to copy the context configuration to your `.kubeconfig` file on the `WSL2` home directory or the other way round, depending on which shell you use to run the terraform code. | ||
|
||
```powershell | ||
cp /mnt/c/users/$(whoami)/.kube/config ~/.kube/config | ||
``` | ||
```powershell | ||
cp /mnt/c/users/$(whoami)/.kube/config ~/.kube/config | ||
``` | ||
|
||
or | ||
or | ||
|
||
```powershell | ||
cp ~/.kube/config /mnt/c/users/$(whoami)/.kube/config | ||
``` | ||
```powershell | ||
cp ~/.kube/config /mnt/c/users/$(whoami)/.kube/config | ||
``` | ||
|
||
The cluster creation automatically add configuration to connect to the new cluster | ||
The cluster creation automatically add configuration to your `kubectl` contexts connect to so you can connect to the new cluster | ||
|
||
```powershell | ||
kubectl cluster-info --context k3d-devinfra | ||
``` | ||
|
||
To delete the cluster again, just run `terraform destroy --auto-approve`. | ||
To delete the cluster again, just run | ||
|
||
```shell | ||
terraform destroy --auto-approve | ||
``` |
Oops, something went wrong.