A reference for spinning up Nautobot on top of a Kubernetes environment
Install k3s with bash script
curl -sfL https://get.k3s.io | sh -
change permissions on k3s config file
sudo chown $USER:$USER /etc/rancher/k3s/k3s.yaml
validate status
kubectl get nodes
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
create KUBECONFIG variable and set the value to our k3s config file
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
install helm repo for nautobot
helm repo add nautobot https://nautobot.github.io/helm-charts/
Create nautobot-config.yaml
and store our configuration options for Nautobot
postgresql:
postgresqlPassword: "panofficehours"
redis:
auth:
password: "panofficehours"
nautobot:
superUser:
apitoken: "abcdefghijklmnop123"
email: "[email protected]"
enabled: True
password: "panofficehours"
username: "paloalto"
deploy nautobot with our nautobot-config.yaml
file
helm install nautobot nautobot/nautobot -f ./nautobot-config.yaml --create-namespace -n nautobot
create a service file to expose nautobot on port 30080
vim nautobot-service.yaml
apiVersion: v1
kind: Service
metadata:
name: nautobot-service
spec:
ports:
- name: http
protocol: TCP
port: 8080
targetPort: 8080
nodePort: 30080
selector:
app.kubernetes.io/component: nautobot
app.kubernetes.io/instance: nautobot
app.kubernetes.io/name: nautobot
type: NodePort
deploy our service file
kubectl apply -f nautobot-service.yaml -n nautobot