Deploy sample application

Deploy nginx pod on a Bottlerocket node

Create a namespace

kubectl create namespace bottlerocket-nginx

Create a simple nginx pod config:

cat <<EoF > ~/environment/bottlerocket-nginx.yaml
apiVersion: v1
kind: Pod
metadata:
  name: nginx
  namespace: bottlerocket-nginx
  labels:
    env: test
spec:
  containers:
  - name: nginx
    image: nginx
    imagePullPolicy: IfNotPresent
  nodeSelector:
    role: bottlerocket
EoF

Deploy the application:

kubectl create -f ~/environment/bottlerocket-nginx.yaml

Next, run the following command to confirm the new application is running on the bottlerocket node:

kubectl describe pod/nginx -n bottlerocket-nginx

Output:


Node:         ip-192-168-70-50.us-east-2.compute.internal/192.168.70.50