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
#!/bin/bash | |
kind create cluster —image kindest/node:v1.28.0 --name kind128 |
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
#!/bin/bash | |
apt update && apt install -y bash-completion | |
echo 'source <(kubectl completion bash)' >> ~/.bashrc | |
echo 'source /usr/share/bash-completion/bash_completion' >> ~/.bashrc | |
echo 'alias k=kubectl' >> ~/.bashrc | |
echo 'complete -o default -F __start_kubectl k' >> ~/.bashrc | |
source ~/.bashrc |
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
#!/bin/bash | |
# from a shell to kind-control-plane | |
# install bash completion with apt package manager | |
apt update && apt install -y bash-completion | |
# add kubectl bash completion to bashrc | |
echo 'source <(kubectl completion bash)' >> ~/.bashrc | |
# add the source for bash completion to bashrc |
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
kubectl run nginx --image nginx --dry-run=client -o yaml > pod.yaml |
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: nginx | |
name: nginx | |
spec: | |
containers: | |
- image: nginx |
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
# install dependencies | |
sudo apt install -y curl openssh-server ca-certificates tzdata | |
# install smtp server | |
sudo apt install -y postfix | |
# add gitlab package to our local repository | |
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash | |
# install gitlab with external URL |
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: az1-pod | |
name: az1-pod | |
namespace: 012963bd | |
spec: | |
affinity: |
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
# install bash-completion on debian | |
apt update && apt install -y bash-completion | |
# add the following lines to your .bashrc file | |
echo 'source <(kubectl completion bash)' >> ~/.bashrc | |
echo 'source /usr/share/bash-completion/bash_completion' >> ~/.bashrc | |
echo 'alias k=kubectl' >> ~/.bashrc | |
echo 'complete -o default -F __start_kubectl k' >> ~/.bashrc | |
# source your .bashrc |
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
cat <<EOF | k apply -f - | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: sleep-pod | |
spec: | |
containers: | |
- name: pv-container | |
image: nginx | |
command: ["sh", "-c", "while true; do echo sync logs; sleep 2; done"] |
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
cat <<EOF | k apply -f - | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: pv-pod | |
spec: | |
containers: | |
- name: pv-container | |
image: nginx | |
volumeMounts: |