Total time: 15 minutes 
Updated: July 22nd, 2020
Calling all writers!

We’re hiring. Write for Howchoo

pi
PRIMARY
216 guides
How to Use Raspberry Pi Imager How to Use Raspberry Pi ImagerNew official Raspberry Pi imaging software.
How to Enable SSH on Raspberry Pi Without a Screen How to Enable SSH on Raspberry Pi Without a ScreenThe SSH protocol is disabled by default.
Raspberry Pi Projects Raspberry Pi ProjectsFind amazing Pi projects for any skill level!
Calling all writers!

We’re hiring. Write for Howchoo

Ben's profile pictureBen
Joined in 2020
Ben Stockton is a tech writer and former college lecturer from the UK. He enjoys gaming, gadgets, and helping others.
Raspberry Pi livestreams each Thursday with new things for kids to code!
Michael's profile picture MichaelView
In these interests: kidsnewspi
For Raspberry Pi beginners who still love to follow along in a book.
Michael's profile picture MichaelView
In these interests: booksretropiepi
What’s better than an experiment? An experiment in space!
Michael's profile picture MichaelView
In these interests: kidspinews
Kali Linux is a great distribution for Raspberry Pi users who want to get to grips with security testing.
The Raspberry Pi micro-computer grows in power with each new model release, with more resources that make it a more capable, low-cost content server for your media and resources.
Laptops, smartphones, tablets, even lightbulbs—an endless number of devices now have the ability to connect to your local network and the wider internet.
The Raspberry Pi was designed to boot from an SD card, but in some cases, it’s convenient to boot from a USB drive.
Get the new official Raspberry Pi OS on your Pi.
New to the Raspberry Pi? Start here.
Blocking ads just got easier with Pi-hole, a network-wide ad blocker for the Raspberry Pi
Don’t skip out on a proper case for your Pi 4.
The only Raspberry Pi Bluetooth guide you’ll ever need.
pi
PRIMARY
The Raspberry Pi is a small, inexpensive computer developed by the Raspberry Pi Foundation in the United Kingdom.

Top 5 Yoga Accessories: Things Every Yogi Should Have

Yoga mat.Yoga mat.
Enhance your practice.
Tayler Tayler (23)
0
Updated: July 22nd, 2020

In the past, practicing yoga was as simple as rolling out your yoga mat and settling into a practice. Some yogis began noticing, however, that some practitioners weren’t able to sink into certain poses properly and they began developing different tools and accessories that would help struggling yogis achieve difficult poses safely. In the 1960s, the yoga market began seeing an emergence of new and creative items that were totally different from standard mats.

Nowadays there are so many different things on the market that it can be difficult to parse out the good from the bad.

With this guide, we’ll show you the top 5 yoga accessories that will safely enhance your practice by giving you support while encouraging proper practice techniques!

Posted in these interests:

Yoga
yoga
PRIMARY
5 guides
fitness
13 guides

Why use a yoga strap

Yoga straps are a great way to ease a little deeper into poses that would otherwise be difficult. Flexibility, like most things in life, is fluid and unique to each of us. I, for example, have the tightest hamstrings in the world and I like to use a strap to work on stretching out those muscles. They’re versatile, too, which means you can use them however you like!

This Tumaz Yoga Strap is great addition to your practice. Here’s why!

What makes this yoga strap awesome

  • The band is thick enough to be durable and won’t stretch, meaning you can maneuver into poses safely.
  • D-ring buckles add more versatility – you can create a loop if that best fits your practice.
  • It’s capable of holding a ton of weight (2,379 pounds, to be exact).
  • It comes in a variety of jazzy colors!

Different ways to use the yoga strap

  • While lying down on your back, you can fold the strap around your foot and, while holding the strap taught, work on the flexibility in your hamstring and hip flexor by working your foot closer to your face.
  • While standing, you can fold the strap around your foot and work on lifting your leg while it’s straight. The strap will allow you to work on keeping your leg straight.
  • While kneeling, you can work on your shoulder flexibility by lifting one arm and folding it back over your shoulder with the strap in your hand. With your other arm, you reach around behind your back and grab the strap. This works on your shoulder and tricep flexibility.

Buy the Tumaz Yoga Strap on Amazon.

Tumaz strap.Tumaz strap.

Why use a yoga block

Yoga blocks are often used as an extension of the arms, which is handy when working into poses that require you to elongate your body. They’re also durable enough to support your weight, which is great when you want to work on the alignment of your body in certain poses.

A long-standing and popular name in the yoga industry, these Gaiam Essentials Yoga Blocks are perfect if you want to enhance your practice.

What makes these blocks awesome

  • They’re made of durable foam that can support your full weight without condensing.
  • The foam is nonslip, so it won’t move around beneath you while it supports your weight.
  • They’re also easy to clean if you’re a sweatier yogi!

Different ways to use yoga blocks

  • While sitting with your feet tucked beneath you, you can tuck your block beneath your posterior, which takes pressure away from your knees.
  • If you have trouble touching your toes, you can stand your blocks on either side of your feet to support your hands in a forward fold.
  • While seated with the bottoms of your feet touching, you can release your knees outward, which opens up your inner thighs and hips. Placing a block beneath each knee can relieve any discomfort if you’re particularly tight in this area!

Buy the Gaiam Essentials Yoga Blocks on Amazon.

Gaiam blocks.Gaiam blocks.

Why use a yoga towel

Yoga towels are great, not only if you tend to sweat during yoga practices, but they offer a little added cushion. If you practice on hard surfaces, you know what I’m talking about. I’ve practiced on surfaces like hardwood floors and concrete and they’re always hard on my knees! A folded-up yoga towel beneath your knees or wrists can offer some reprieve from such surfaces.

This Pefi Yoga Towel is perfect for dabbing away sweat during a Bikram class while offering just enough cushion without interrupting your practice.

What makes this towel awesome

  • One side is made of soft microfibers while the other has a distinct waffle shaped texture that won’t slide around.
  • It’s easy to wash and dries quickly.
  • It’s 72″ long and 24″ wide, so you can use this towel in place of a yoga mat. -It comes in a variety of jazzy tie-dye colors!

Different ways to use the yoga towel

  • Keep your towel to the side of your practice, just within reach if you need to swipe away sweat.
  • Drape your towel directly on top of your yoga mat to catch any downpours during a Bikram class.
  • Fold your towel up and place it beneath your knees to offer another layer between you and the ground.

Buy the Pefi Yoga Towel on Amazon.

Pefti towel.Pefti towel.

Why use a yoga bolster

An uncommon addition to a yoga practice, yoga bolsters are a long and firm pillow that can be used to provide extra comfort and support. They’re mainly used in restorative yoga practices and postures and can help to further open up the diaphragm and encourage deeper breathing.

This Retrospec Sequoia Yoga Bolster offers the right amount of support and comfort for any yogi looking to deepen their breathing.

What makes this yoga bolster awesome

  • This bolster comes in either a rectangular shape or a round, cylindrical shape to fit your specific needs.
  • The cover is removable and machine washable so you don’t have to worry about dirtying up the fabric.
  • A thick handle at the end makes this cushion easy to carry.
  • It offers support for yogis with tightness in the spine.
  • It comes in a variety of fun colors!

Different ways to use this yoga bolster

  • In child’s pose, you can tuck your yoga bolster beneath your body with your knees wide so you’re straddling the bolster.
  • When you’re seated with your legs crossed beneath you, you can sit on your bolster which can add extra support to your pose.
  • You can sit with your legs extended up a wall and you can tuck your bolster beneath your lower back and pelvis.

You can find this Retrospec Sequoia Yoga Bolster on Amazon.

Retrospec bolster.Retrospec bolster.

Why use a yoga wheel

Our fifth and final item on this list is a newer one in the yoga game and is the perfect addition to your practice if you want to work on backbends, heart-opening positions, or if you just want a fun and new way to massage your spine!

This UpCircleSeven Yoga Wheel is the top-of-the-line wheel when it comes to circular objects in your practice.

What makes this yoga wheel awesome

  • This wheel is able to withstand 550 pounds and won’t flex, even with your full body weight on it.
  • Thick padding on the outside of the wheel cushions your body.
  • The padding is also textured to ensure it grips to your yoga mat or towel, minimizing the amount of unnecessary slipping.
  • It also comes with a PDF e-guide to show you how to use it and use it safely!
  • It comes in (you guessed it!) jazzy colors so you can customize your experience.

Different ways to use this yoga wheel

  • Use your wheel to stretch the front side of your body by holding your wheel in place and carefully laying backward on it. Maneuver your wheel slowly so you can control how deep you want to take your stretch.
  • With the same position above, move the wheel carefully down your spine. It’s similar to massaging your body with a body roller, but it offers a larger shape to maneuver your body about.
  • If backbends are a part of your practice or you want to work them into your practice, the wheel offers the perfect shape to begin opening up into your spine.

You can find this UpCircleSeven Yoga Wheel on Amazon.

UpCircleSeven wheel.UpCircleSeven wheel.

Top 5 Yoga Accessories: Things Every Yogi Should Have

Yoga mat.Yoga mat.
Enhance your practice.
Tayler Tayler (23)
0
Updated: July 22nd, 2020

In the past, practicing yoga was as simple as rolling out your yoga mat and settling into a practice. Some yogis began noticing, however, that some practitioners weren’t able to sink into certain poses properly and they began developing different tools and accessories that would help struggling yogis achieve difficult poses safely. In the 1960s, the yoga market began seeing an emergence of new and creative items that were totally different from standard mats.

Nowadays there are so many different things on the market that it can be difficult to parse out the good from the bad.

With this guide, we’ll show you the top 5 yoga accessories that will safely enhance your practice by giving you support while encouraging proper practice techniques!

Posted in these interests:

Yoga
yoga
PRIMARY
5 guides
fitness
13 guides

Why use a yoga strap

Yoga straps are a great way to ease a little deeper into poses that would otherwise be difficult. Flexibility, like most things in life, is fluid and unique to each of us. I, for example, have the tightest hamstrings in the world and I like to use a strap to work on stretching out those muscles. They’re versatile, too, which means you can use them however you like!

This Tumaz Yoga Strap is great addition to your practice. Here’s why!

What makes this yoga strap awesome

  • The band is thick enough to be durable and won’t stretch, meaning you can maneuver into poses safely.
  • D-ring buckles add more versatility – you can create a loop if that best fits your practice.
  • It’s capable of holding a ton of weight (2,379 pounds, to be exact).
  • It comes in a variety of jazzy colors!

Different ways to use the yoga strap

  • While lying down on your back, you can fold the strap around your foot and, while holding the strap taught, work on the flexibility in your hamstring and hip flexor by working your foot closer to your face.
  • While standing, you can fold the strap around your foot and work on lifting your leg while it’s straight. The strap will allow you to work on keeping your leg straight.
  • While kneeling, you can work on your shoulder flexibility by lifting one arm and folding it back over your shoulder with the strap in your hand. With your other arm, you reach around behind your back and grab the strap. This works on your shoulder and tricep flexibility.

Buy the Tumaz Yoga Strap on Amazon.

Tumaz strap.Tumaz strap.

Why use a yoga block

Yoga blocks are often used as an extension of the arms, which is handy when working into poses that require you to elongate your body. They’re also durable enough to support your weight, which is great when you want to work on the alignment of your body in certain poses.

A long-standing and popular name in the yoga industry, these Gaiam Essentials Yoga Blocks are perfect if you want to enhance your practice.

What makes these blocks awesome

  • They’re made of durable foam that can support your full weight without condensing.
  • The foam is nonslip, so it won’t move around beneath you while it supports your weight.
  • They’re also easy to clean if you’re a sweatier yogi!

Different ways to use yoga blocks

  • While sitting with your feet tucked beneath you, you can tuck your block beneath your posterior, which takes pressure away from your knees.
  • If you have trouble touching your toes, you can stand your blocks on either side of your feet to support your hands in a forward fold.
  • While seated with the bottoms of your feet touching, you can release your knees outward, which opens up your inner thighs and hips. Placing a block beneath each knee can relieve any discomfort if you’re particularly tight in this area!

Buy the Gaiam Essentials Yoga Blocks on Amazon.

Gaiam blocks.Gaiam blocks.

Why use a yoga towel

Yoga towels are great, not only if you tend to sweat during yoga practices, but they offer a little added cushion. If you practice on hard surfaces, you know what I’m talking about. I’ve practiced on surfaces like hardwood floors and concrete and they’re always hard on my knees! A folded-up yoga towel beneath your knees or wrists can offer some reprieve from such surfaces.

This Pefi Yoga Towel is perfect for dabbing away sweat during a Bikram class while offering just enough cushion without interrupting your practice.

What makes this towel awesome

  • One side is made of soft microfibers while the other has a distinct waffle shaped texture that won’t slide around.
  • It’s easy to wash and dries quickly.
  • It’s 72″ long and 24″ wide, so you can use this towel in place of a yoga mat. -It comes in a variety of jazzy tie-dye colors!

Different ways to use the yoga towel

  • Keep your towel to the side of your practice, just within reach if you need to swipe away sweat.
  • Drape your towel directly on top of your yoga mat to catch any downpours during a Bikram class.
  • Fold your towel up and place it beneath your knees to offer another layer between you and the ground.

Buy the Pefi Yoga Towel on Amazon.

Pefti towel.Pefti towel.

Why use a yoga bolster

An uncommon addition to a yoga practice, yoga bolsters are a long and firm pillow that can be used to provide extra comfort and support. They’re mainly used in restorative yoga practices and postures and can help to further open up the diaphragm and encourage deeper breathing.

This Retrospec Sequoia Yoga Bolster offers the right amount of support and comfort for any yogi looking to deepen their breathing.

What makes this yoga bolster awesome

  • This bolster comes in either a rectangular shape or a round, cylindrical shape to fit your specific needs.
  • The cover is removable and machine washable so you don’t have to worry about dirtying up the fabric.
  • A thick handle at the end makes this cushion easy to carry.
  • It offers support for yogis with tightness in the spine.
  • It comes in a variety of fun colors!

Different ways to use this yoga bolster

  • In child’s pose, you can tuck your yoga bolster beneath your body with your knees wide so you’re straddling the bolster.
  • When you’re seated with your legs crossed beneath you, you can sit on your bolster which can add extra support to your pose.
  • You can sit with your legs extended up a wall and you can tuck your bolster beneath your lower back and pelvis.

You can find this Retrospec Sequoia Yoga Bolster on Amazon.

Retrospec bolster.Retrospec bolster.

Why use a yoga wheel

Our fifth and final item on this list is a newer one in the yoga game and is the perfect addition to your practice if you want to work on backbends, heart-opening positions, or if you just want a fun and new way to massage your spine!

This UpCircleSeven Yoga Wheel is the top-of-the-line wheel when it comes to circular objects in your practice.

What makes this yoga wheel awesome

  • This wheel is able to withstand 550 pounds and won’t flex, even with your full body weight on it.
  • Thick padding on the outside of the wheel cushions your body.
  • The padding is also textured to ensure it grips to your yoga mat or towel, minimizing the amount of unnecessary slipping.
  • It also comes with a PDF e-guide to show you how to use it and use it safely!
  • It comes in (you guessed it!) jazzy colors so you can customize your experience.

Different ways to use this yoga wheel

  • Use your wheel to stretch the front side of your body by holding your wheel in place and carefully laying backward on it. Maneuver your wheel slowly so you can control how deep you want to take your stretch.
  • With the same position above, move the wheel carefully down your spine. It’s similar to massaging your body with a body roller, but it offers a larger shape to maneuver your body about.
  • If backbends are a part of your practice or you want to work them into your practice, the wheel offers the perfect shape to begin opening up into your spine.

You can find this UpCircleSeven Yoga Wheel on Amazon.

UpCircleSeven wheel.UpCircleSeven wheel.
Jump to step

Top 5 Yoga Accessories: Things Every Yogi Should Have

Yoga mat.Yoga mat.
Enhance your practice.
Tayler Tayler (23)
0
Updated: July 22nd, 2020

In the past, practicing yoga was as simple as rolling out your yoga mat and settling into a practice. Some yogis began noticing, however, that some practitioners weren’t able to sink into certain poses properly and they began developing different tools and accessories that would help struggling yogis achieve difficult poses safely. In the 1960s, the yoga market began seeing an emergence of new and creative items that were totally different from standard mats.

Nowadays there are so many different things on the market that it can be difficult to parse out the good from the bad.

With this guide, we’ll show you the top 5 yoga accessories that will safely enhance your practice by giving you support while encouraging proper practice techniques!

Posted in these interests:

Yoga
yoga
PRIMARY
5 guides
fitness
13 guides

Why use a yoga strap

Yoga straps are a great way to ease a little deeper into poses that would otherwise be difficult. Flexibility, like most things in life, is fluid and unique to each of us. I, for example, have the tightest hamstrings in the world and I like to use a strap to work on stretching out those muscles. They’re versatile, too, which means you can use them however you like!

This Tumaz Yoga Strap is great addition to your practice. Here’s why!

What makes this yoga strap awesome

  • The band is thick enough to be durable and won’t stretch, meaning you can maneuver into poses safely.
  • D-ring buckles add more versatility – you can create a loop if that best fits your practice.
  • It’s capable of holding a ton of weight (2,379 pounds, to be exact).
  • It comes in a variety of jazzy colors!

Different ways to use the yoga strap

  • While lying down on your back, you can fold the strap around your foot and, while holding the strap taught, work on the flexibility in your hamstring and hip flexor by working your foot closer to your face.
  • While standing, you can fold the strap around your foot and work on lifting your leg while it’s straight. The strap will allow you to work on keeping your leg straight.
  • While kneeling, you can work on your shoulder flexibility by lifting one arm and folding it back over your shoulder with the strap in your hand. With your other arm, you reach around behind your back and grab the strap. This works on your shoulder and tricep flexibility.

Buy the Tumaz Yoga Strap on Amazon.

Tumaz strap.Tumaz strap.

Why use a yoga block

Yoga blocks are often used as an extension of the arms, which is handy when working into poses that require you to elongate your body. They’re also durable enough to support your weight, which is great when you want to work on the alignment of your body in certain poses.

A long-standing and popular name in the yoga industry, these Gaiam Essentials Yoga Blocks are perfect if you want to enhance your practice.

What makes these blocks awesome

  • They’re made of durable foam that can support your full weight without condensing.
  • The foam is nonslip, so it won’t move around beneath you while it supports your weight.
  • They’re also easy to clean if you’re a sweatier yogi!

Different ways to use yoga blocks

  • While sitting with your feet tucked beneath you, you can tuck your block beneath your posterior, which takes pressure away from your knees.
  • If you have trouble touching your toes, you can stand your blocks on either side of your feet to support your hands in a forward fold.
  • While seated with the bottoms of your feet touching, you can release your knees outward, which opens up your inner thighs and hips. Placing a block beneath each knee can relieve any discomfort if you’re particularly tight in this area!

Buy the Gaiam Essentials Yoga Blocks on Amazon.

Gaiam blocks.Gaiam blocks.

Why use a yoga towel

Yoga towels are great, not only if you tend to sweat during yoga practices, but they offer a little added cushion. If you practice on hard surfaces, you know what I’m talking about. I’ve practiced on surfaces like hardwood floors and concrete and they’re always hard on my knees! A folded-up yoga towel beneath your knees or wrists can offer some reprieve from such surfaces.

This Pefi Yoga Towel is perfect for dabbing away sweat during a Bikram class while offering just enough cushion without interrupting your practice.

What makes this towel awesome

  • One side is made of soft microfibers while the other has a distinct waffle shaped texture that won’t slide around.
  • It’s easy to wash and dries quickly.
  • It’s 72″ long and 24″ wide, so you can use this towel in place of a yoga mat. -It comes in a variety of jazzy tie-dye colors!

Different ways to use the yoga towel

  • Keep your towel to the side of your practice, just within reach if you need to swipe away sweat.
  • Drape your towel directly on top of your yoga mat to catch any downpours during a Bikram class.
  • Fold your towel up and place it beneath your knees to offer another layer between you and the ground.

Buy the Pefi Yoga Towel on Amazon.

Pefti towel.Pefti towel.

Why use a yoga bolster

An uncommon addition to a yoga practice, yoga bolsters are a long and firm pillow that can be used to provide extra comfort and support. They’re mainly used in restorative yoga practices and postures and can help to further open up the diaphragm and encourage deeper breathing.

This Retrospec Sequoia Yoga Bolster offers the right amount of support and comfort for any yogi looking to deepen their breathing.

What makes this yoga bolster awesome

  • This bolster comes in either a rectangular shape or a round, cylindrical shape to fit your specific needs.
  • The cover is removable and machine washable so you don’t have to worry about dirtying up the fabric.
  • A thick handle at the end makes this cushion easy to carry.
  • It offers support for yogis with tightness in the spine.
  • It comes in a variety of fun colors!

Different ways to use this yoga bolster

  • In child’s pose, you can tuck your yoga bolster beneath your body with your knees wide so you’re straddling the bolster.
  • When you’re seated with your legs crossed beneath you, you can sit on your bolster which can add extra support to your pose.
  • You can sit with your legs extended up a wall and you can tuck your bolster beneath your lower back and pelvis.

You can find this Retrospec Sequoia Yoga Bolster on Amazon.

Retrospec bolster.Retrospec bolster.

Why use a yoga wheel

Our fifth and final item on this list is a newer one in the yoga game and is the perfect addition to your practice if you want to work on backbends, heart-opening positions, or if you just want a fun and new way to massage your spine!

This UpCircleSeven Yoga Wheel is the top-of-the-line wheel when it comes to circular objects in your practice.

What makes this yoga wheel awesome

  • This wheel is able to withstand 550 pounds and won’t flex, even with your full body weight on it.
  • Thick padding on the outside of the wheel cushions your body.
  • The padding is also textured to ensure it grips to your yoga mat or towel, minimizing the amount of unnecessary slipping.
  • It also comes with a PDF e-guide to show you how to use it and use it safely!
  • It comes in (you guessed it!) jazzy colors so you can customize your experience.

Different ways to use this yoga wheel

  • Use your wheel to stretch the front side of your body by holding your wheel in place and carefully laying backward on it. Maneuver your wheel slowly so you can control how deep you want to take your stretch.
  • With the same position above, move the wheel carefully down your spine. It’s similar to massaging your body with a body roller, but it offers a larger shape to maneuver your body about.
  • If backbends are a part of your practice or you want to work them into your practice, the wheel offers the perfect shape to begin opening up into your spine.

You can find this UpCircleSeven Yoga Wheel on Amazon.

UpCircleSeven wheel.UpCircleSeven wheel.

Top 5 Yoga Accessories: Things Every Yogi Should Have

Yoga mat.Yoga mat.
Enhance your practice.
Tayler Tayler (23)
0
Updated: July 22nd, 2020

In the past, practicing yoga was as simple as rolling out your yoga mat and settling into a practice. Some yogis began noticing, however, that some practitioners weren’t able to sink into certain poses properly and they began developing different tools and accessories that would help struggling yogis achieve difficult poses safely. In the 1960s, the yoga market began seeing an emergence of new and creative items that were totally different from standard mats.

Nowadays there are so many different things on the market that it can be difficult to parse out the good from the bad.

With this guide, we’ll show you the top 5 yoga accessories that will safely enhance your practice by giving you support while encouraging proper practice techniques!

Posted in these interests:

Yoga
yoga
PRIMARY
5 guides
fitness
13 guides

Top 5 Yoga Accessories: Things Every Yogi Should Have

yogafitness
Enhance your practice.
Tayler Tayler (23)
0
Updated: July 22nd, 2020
Tayler
 

Posted in these interests:

Yoga
yoga
PRIMARY
5 guides
fitness
13 guides
Yoga
yoga
PRIMARY
5 guides
fitness
13 guides
Yoga
PRIMARY
Jump to step
Calling all writers!

We’re hiring. Write for Howchoo

 
In these interests
Yoga
yoga
PRIMARY
5 guides
fitness
13 guides
Yoga
yoga
PRIMARY
5 guides
fitness
13 guides
Yoga
PRIMARY
Jump to step

Why use a yoga strap

Yoga straps are a great way to ease a little deeper into poses that would otherwise be difficult. Flexibility, like most things in life, is fluid and unique to each of us. I, for example, have the tightest hamstrings in the world and I like to use a strap to work on stretching out those muscles. They’re versatile, too, which means you can use them however you like!

This Tumaz Yoga Strap is great addition to your practice. Here’s why!

What makes this yoga strap awesome

  • The band is thick enough to be durable and won’t stretch, meaning you can maneuver into poses safely.
  • D-ring buckles add more versatility – you can create a loop if that best fits your practice.
  • It’s capable of holding a ton of weight (2,379 pounds, to be exact).
  • It comes in a variety of jazzy colors!

Different ways to use the yoga strap

  • While lying down on your back, you can fold the strap around your foot and, while holding the strap taught, work on the flexibility in your hamstring and hip flexor by working your foot closer to your face.
  • While standing, you can fold the strap around your foot and work on lifting your leg while it’s straight. The strap will allow you to work on keeping your leg straight.
  • While kneeling, you can work on your shoulder flexibility by lifting one arm and folding it back over your shoulder with the strap in your hand. With your other arm, you reach around behind your back and grab the strap. This works on your shoulder and tricep flexibility.

Buy the Tumaz Yoga Strap on Amazon.

Tumaz strap.Tumaz strap.

Why use a yoga block

Yoga blocks are often used as an extension of the arms, which is handy when working into poses that require you to elongate your body. They’re also durable enough to support your weight, which is great when you want to work on the alignment of your body in certain poses.

A long-standing and popular name in the yoga industry, these Gaiam Essentials Yoga Blocks are perfect if you want to enhance your practice.

What makes these blocks awesome

  • They’re made of durable foam that can support your full weight without condensing.
  • The foam is nonslip, so it won’t move around beneath you while it supports your weight.
  • They’re also easy to clean if you’re a sweatier yogi!

Different ways to use yoga blocks

  • While sitting with your feet tucked beneath you, you can tuck your block beneath your posterior, which takes pressure away from your knees.
  • If you have trouble touching your toes, you can stand your blocks on either side of your feet to support your hands in a forward fold.
  • While seated with the bottoms of your feet touching, you can release your knees outward, which opens up your inner thighs and hips. Placing a block beneath each knee can relieve any discomfort if you’re particularly tight in this area!

Buy the Gaiam Essentials Yoga Blocks on Amazon.

Gaiam blocks.Gaiam blocks.

Why use a yoga towel

Yoga towels are great, not only if you tend to sweat during yoga practices, but they offer a little added cushion. If you practice on hard surfaces, you know what I’m talking about. I’ve practiced on surfaces like hardwood floors and concrete and they’re always hard on my knees! A folded-up yoga towel beneath your knees or wrists can offer some reprieve from such surfaces.

This Pefi Yoga Towel is perfect for dabbing away sweat during a Bikram class while offering just enough cushion without interrupting your practice.

What makes this towel awesome

  • One side is made of soft microfibers while the other has a distinct waffle shaped texture that won’t slide around.
  • It’s easy to wash and dries quickly.
  • It’s 72″ long and 24″ wide, so you can use this towel in place of a yoga mat. -It comes in a variety of jazzy tie-dye colors!

Different ways to use the yoga towel

  • Keep your towel to the side of your practice, just within reach if you need to swipe away sweat.
  • Drape your towel directly on top of your yoga mat to catch any downpours during a Bikram class.
  • Fold your towel up and place it beneath your knees to offer another layer between you and the ground.

Buy the Pefi Yoga Towel on Amazon.

Pefti towel.Pefti towel.

Why use a yoga bolster

An uncommon addition to a yoga practice, yoga bolsters are a long and firm pillow that can be used to provide extra comfort and support. They’re mainly used in restorative yoga practices and postures and can help to further open up the diaphragm and encourage deeper breathing.

This Retrospec Sequoia Yoga Bolster offers the right amount of support and comfort for any yogi looking to deepen their breathing.

What makes this yoga bolster awesome

  • This bolster comes in either a rectangular shape or a round, cylindrical shape to fit your specific needs.
  • The cover is removable and machine washable so you don’t have to worry about dirtying up the fabric.
  • A thick handle at the end makes this cushion easy to carry.
  • It offers support for yogis with tightness in the spine.
  • It comes in a variety of fun colors!

Different ways to use this yoga bolster

  • In child’s pose, you can tuck your yoga bolster beneath your body with your knees wide so you’re straddling the bolster.
  • When you’re seated with your legs crossed beneath you, you can sit on your bolster which can add extra support to your pose.
  • You can sit with your legs extended up a wall and you can tuck your bolster beneath your lower back and pelvis.

You can find this Retrospec Sequoia Yoga Bolster on Amazon.

Retrospec bolster.Retrospec bolster.

Why use a yoga wheel

Our fifth and final item on this list is a newer one in the yoga game and is the perfect addition to your practice if you want to work on backbends, heart-opening positions, or if you just want a fun and new way to massage your spine!

This UpCircleSeven Yoga Wheel is the top-of-the-line wheel when it comes to circular objects in your practice.

What makes this yoga wheel awesome

  • This wheel is able to withstand 550 pounds and won’t flex, even with your full body weight on it.
  • Thick padding on the outside of the wheel cushions your body.
  • The padding is also textured to ensure it grips to your yoga mat or towel, minimizing the amount of unnecessary slipping.
  • It also comes with a PDF e-guide to show you how to use it and use it safely!
  • It comes in (you guessed it!) jazzy colors so you can customize your experience.

Different ways to use this yoga wheel

  • Use your wheel to stretch the front side of your body by holding your wheel in place and carefully laying backward on it. Maneuver your wheel slowly so you can control how deep you want to take your stretch.
  • With the same position above, move the wheel carefully down your spine. It’s similar to massaging your body with a body roller, but it offers a larger shape to maneuver your body about.
  • If backbends are a part of your practice or you want to work them into your practice, the wheel offers the perfect shape to begin opening up into your spine.

You can find this UpCircleSeven Yoga Wheel on Amazon.

UpCircleSeven wheel.UpCircleSeven wheel.

Why use a yoga strap

Yoga straps are a great way to ease a little deeper into poses that would otherwise be difficult. Flexibility, like most things in life, is fluid and unique to each of us. I, for example, have the tightest hamstrings in the world and I like to use a strap to work on stretching out those muscles. They’re versatile, too, which means you can use them however you like!

This Tumaz Yoga Strap is great addition to your practice. Here’s why!

What makes this yoga strap awesome

  • The band is thick enough to be durable and won’t stretch, meaning you can maneuver into poses safely.
  • D-ring buckles add more versatility – you can create a loop if that best fits your practice.
  • It’s capable of holding a ton of weight (2,379 pounds, to be exact).
  • It comes in a variety of jazzy colors!

Different ways to use the yoga strap

  • While lying down on your back, you can fold the strap around your foot and, while holding the strap taught, work on the flexibility in your hamstring and hip flexor by working your foot closer to your face.
  • While standing, you can fold the strap around your foot and work on lifting your leg while it’s straight. The strap will allow you to work on keeping your leg straight.
  • While kneeling, you can work on your shoulder flexibility by lifting one arm and folding it back over your shoulder with the strap in your hand. With your other arm, you reach around behind your back and grab the strap. This works on your shoulder and tricep flexibility.

Buy the Tumaz Yoga Strap on Amazon.

Tumaz strap.Tumaz strap.

Why use a yoga strap

Yoga straps are a great way to ease a little deeper into poses that would otherwise be difficult. Flexibility, like most things in life, is fluid and unique to each of us. I, for example, have the tightest hamstrings in the world and I like to use a strap to work on stretching out those muscles. They’re versatile, too, which means you can use them however you like!

This Tumaz Yoga Strap is great addition to your practice. Here’s why!

What makes this yoga strap awesome

  • The band is thick enough to be durable and won’t stretch, meaning you can maneuver into poses safely.
  • D-ring buckles add more versatility – you can create a loop if that best fits your practice.
  • It’s capable of holding a ton of weight (2,379 pounds, to be exact).
  • It comes in a variety of jazzy colors!

Different ways to use the yoga strap

  • While lying down on your back, you can fold the strap around your foot and, while holding the strap taught, work on the flexibility in your hamstring and hip flexor by working your foot closer to your face.
  • While standing, you can fold the strap around your foot and work on lifting your leg while it’s straight. The strap will allow you to work on keeping your leg straight.
  • While kneeling, you can work on your shoulder flexibility by lifting one arm and folding it back over your shoulder with the strap in your hand. With your other arm, you reach around behind your back and grab the strap. This works on your shoulder and tricep flexibility.

Buy the Tumaz Yoga Strap on Amazon.

Tumaz strap.Tumaz strap.

Yoga strap

Yoga StrapYoga StrapCheck Price
Things used here
Check PriceYoga Strap
Things used here
Check PriceYoga Strap

Why use a yoga block

Yoga blocks are often used as an extension of the arms, which is handy when working into poses that require you to elongate your body. They’re also durable enough to support your weight, which is great when you want to work on the alignment of your body in certain poses.

A long-standing and popular name in the yoga industry, these Gaiam Essentials Yoga Blocks are perfect if you want to enhance your practice.

What makes these blocks awesome

  • They’re made of durable foam that can support your full weight without condensing.
  • The foam is nonslip, so it won’t move around beneath you while it supports your weight.
  • They’re also easy to clean if you’re a sweatier yogi!

Different ways to use yoga blocks

  • While sitting with your feet tucked beneath you, you can tuck your block beneath your posterior, which takes pressure away from your knees.
  • If you have trouble touching your toes, you can stand your blocks on either side of your feet to support your hands in a forward fold.
  • While seated with the bottoms of your feet touching, you can release your knees outward, which opens up your inner thighs and hips. Placing a block beneath each knee can relieve any discomfort if you’re particularly tight in this area!

Buy the Gaiam Essentials Yoga Blocks on Amazon.

Gaiam blocks.Gaiam blocks.

Why use a yoga block

Yoga blocks are often used as an extension of the arms, which is handy when working into poses that require you to elongate your body. They’re also durable enough to support your weight, which is great when you want to work on the alignment of your body in certain poses.

A long-standing and popular name in the yoga industry, these Gaiam Essentials Yoga Blocks are perfect if you want to enhance your practice.

What makes these blocks awesome

  • They’re made of durable foam that can support your full weight without condensing.
  • The foam is nonslip, so it won’t move around beneath you while it supports your weight.
  • They’re also easy to clean if you’re a sweatier yogi!

Different ways to use yoga blocks

  • While sitting with your feet tucked beneath you, you can tuck your block beneath your posterior, which takes pressure away from your knees.
  • If you have trouble touching your toes, you can stand your blocks on either side of your feet to support your hands in a forward fold.
  • While seated with the bottoms of your feet touching, you can release your knees outward, which opens up your inner thighs and hips. Placing a block beneath each knee can relieve any discomfort if you’re particularly tight in this area!

Buy the Gaiam Essentials Yoga Blocks on Amazon.

Gaiam blocks.Gaiam blocks.

Yoga block

Yoga BlockYoga BlockCheck Price
Things used here
Check PriceYoga Block
Things used here
Check PriceYoga Block

Why use a yoga towel

Yoga towels are great, not only if you tend to sweat during yoga practices, but they offer a little added cushion. If you practice on hard surfaces, you know what I’m talking about. I’ve practiced on surfaces like hardwood floors and concrete and they’re always hard on my knees! A folded-up yoga towel beneath your knees or wrists can offer some reprieve from such surfaces.

This Pefi Yoga Towel is perfect for dabbing away sweat during a Bikram class while offering just enough cushion without interrupting your practice.

What makes this towel awesome

  • One side is made of soft microfibers while the other has a distinct waffle shaped texture that won’t slide around.
  • It’s easy to wash and dries quickly.
  • It’s 72″ long and 24″ wide, so you can use this towel in place of a yoga mat. -It comes in a variety of jazzy tie-dye colors!

Different ways to use the yoga towel

  • Keep your towel to the side of your practice, just within reach if you need to swipe away sweat.
  • Drape your towel directly on top of your yoga mat to catch any downpours during a Bikram class.
  • Fold your towel up and place it beneath your knees to offer another layer between you and the ground.

Buy the Pefi Yoga Towel on Amazon.

Pefti towel.Pefti towel.

Why use a yoga towel

Yoga towels are great, not only if you tend to sweat during yoga practices, but they offer a little added cushion. If you practice on hard surfaces, you know what I’m talking about. I’ve practiced on surfaces like hardwood floors and concrete and they’re always hard on my knees! A folded-up yoga towel beneath your knees or wrists can offer some reprieve from such surfaces.

This Pefi Yoga Towel is perfect for dabbing away sweat during a Bikram class while offering just enough cushion without interrupting your practice.

What makes this towel awesome

  • One side is made of soft microfibers while the other has a distinct waffle shaped texture that won’t slide around.
  • It’s easy to wash and dries quickly.
  • It’s 72″ long and 24″ wide, so you can use this towel in place of a yoga mat. -It comes in a variety of jazzy tie-dye colors!

Different ways to use the yoga towel

  • Keep your towel to the side of your practice, just within reach if you need to swipe away sweat.
  • Drape your towel directly on top of your yoga mat to catch any downpours during a Bikram class.
  • Fold your towel up and place it beneath your knees to offer another layer between you and the ground.

Buy the Pefi Yoga Towel on Amazon.

Pefti towel.Pefti towel.

Yoga towels

Pefi Yoga TowelPefi Yoga TowelCheck Price
Things used here
Check PricePefi Yoga Towel
Things used here
Check PricePefi Yoga Towel

Why use a yoga bolster

An uncommon addition to a yoga practice, yoga bolsters are a long and firm pillow that can be used to provide extra comfort and support. They’re mainly used in restorative yoga practices and postures and can help to further open up the diaphragm and encourage deeper breathing.

This Retrospec Sequoia Yoga Bolster offers the right amount of support and comfort for any yogi looking to deepen their breathing.

What makes this yoga bolster awesome

  • This bolster comes in either a rectangular shape or a round, cylindrical shape to fit your specific needs.
  • The cover is removable and machine washable so you don’t have to worry about dirtying up the fabric.
  • A thick handle at the end makes this cushion easy to carry.
  • It offers support for yogis with tightness in the spine.
  • It comes in a variety of fun colors!

Different ways to use this yoga bolster

  • In child’s pose, you can tuck your yoga bolster beneath your body with your knees wide so you’re straddling the bolster.
  • When you’re seated with your legs crossed beneath you, you can sit on your bolster which can add extra support to your pose.
  • You can sit with your legs extended up a wall and you can tuck your bolster beneath your lower back and pelvis.

You can find this Retrospec Sequoia Yoga Bolster on Amazon.

Retrospec bolster.Retrospec bolster.

Why use a yoga bolster

An uncommon addition to a yoga practice, yoga bolsters are a long and firm pillow that can be used to provide extra comfort and support. They’re mainly used in restorative yoga practices and postures and can help to further open up the diaphragm and encourage deeper breathing.

This Retrospec Sequoia Yoga Bolster offers the right amount of support and comfort for any yogi looking to deepen their breathing.

What makes this yoga bolster awesome

  • This bolster comes in either a rectangular shape or a round, cylindrical shape to fit your specific needs.
  • The cover is removable and machine washable so you don’t have to worry about dirtying up the fabric.
  • A thick handle at the end makes this cushion easy to carry.
  • It offers support for yogis with tightness in the spine.
  • It comes in a variety of fun colors!

Different ways to use this yoga bolster

  • In child’s pose, you can tuck your yoga bolster beneath your body with your knees wide so you’re straddling the bolster.
  • When you’re seated with your legs crossed beneath you, you can sit on your bolster which can add extra support to your pose.
  • You can sit with your legs extended up a wall and you can tuck your bolster beneath your lower back and pelvis.

You can find this Retrospec Sequoia Yoga Bolster on Amazon.

Retrospec bolster.Retrospec bolster.

Yoga bolster

Yoga BolsterYoga BolsterCheck Price
Things used here
Check PriceYoga Bolster
Things used here
Check PriceYoga Bolster

Why use a yoga wheel

Our fifth and final item on this list is a newer one in the yoga game and is the perfect addition to your practice if you want to work on backbends, heart-opening positions, or if you just want a fun and new way to massage your spine!

This UpCircleSeven Yoga Wheel is the top-of-the-line wheel when it comes to circular objects in your practice.

What makes this yoga wheel awesome

  • This wheel is able to withstand 550 pounds and won’t flex, even with your full body weight on it.
  • Thick padding on the outside of the wheel cushions your body.
  • The padding is also textured to ensure it grips to your yoga mat or towel, minimizing the amount of unnecessary slipping.
  • It also comes with a PDF e-guide to show you how to use it and use it safely!
  • It comes in (you guessed it!) jazzy colors so you can customize your experience.

Different ways to use this yoga wheel

  • Use your wheel to stretch the front side of your body by holding your wheel in place and carefully laying backward on it. Maneuver your wheel slowly so you can control how deep you want to take your stretch.
  • With the same position above, move the wheel carefully down your spine. It’s similar to massaging your body with a body roller, but it offers a larger shape to maneuver your body about.
  • If backbends are a part of your practice or you want to work them into your practice, the wheel offers the perfect shape to begin opening up into your spine.

You can find this UpCircleSeven Yoga Wheel on Amazon.

UpCircleSeven wheel.UpCircleSeven wheel.

Why use a yoga wheel

Our fifth and final item on this list is a newer one in the yoga game and is the perfect addition to your practice if you want to work on backbends, heart-opening positions, or if you just want a fun and new way to massage your spine!

This UpCircleSeven Yoga Wheel is the top-of-the-line wheel when it comes to circular objects in your practice.

What makes this yoga wheel awesome

  • This wheel is able to withstand 550 pounds and won’t flex, even with your full body weight on it.
  • Thick padding on the outside of the wheel cushions your body.
  • The padding is also textured to ensure it grips to your yoga mat or towel, minimizing the amount of unnecessary slipping.
  • It also comes with a PDF e-guide to show you how to use it and use it safely!
  • It comes in (you guessed it!) jazzy colors so you can customize your experience.

Different ways to use this yoga wheel

  • Use your wheel to stretch the front side of your body by holding your wheel in place and carefully laying backward on it. Maneuver your wheel slowly so you can control how deep you want to take your stretch.
  • With the same position above, move the wheel carefully down your spine. It’s similar to massaging your body with a body roller, but it offers a larger shape to maneuver your body about.
  • If backbends are a part of your practice or you want to work them into your practice, the wheel offers the perfect shape to begin opening up into your spine.

You can find this UpCircleSeven Yoga Wheel on Amazon.

UpCircleSeven wheel.UpCircleSeven wheel.

Yoga Wheel

Yoga WheelYoga WheelCheck Price
Things used here
Check PriceYoga Wheel
Things used here
Check PriceYoga Wheel
Calling all writers!

We’re hiring. Write for Howchoo

Tayler's profile pictureTayler
Joined in 2020
I like coffee, cats, video games, weird instruments, and unique prose. I sometimes write decent things.
Tayler's profile picturetbirdriouff
Share this guide!
RedditEmailTextPinterest
Related to this guide:
Yoga mat half rolled.Yoga mat half rolled.
Unroll your mat and get to cleaning.
Tayler's profile picture TaylerView
In these interests: essentialoilsfitnessyoga
Minimalist studio.Minimalist studio.
In these interests: fitnessyoga
Best yoga matsBest yoga mats
In these interests: fitnessyoga
Yoga mat half rolled.Yoga mat half rolled.
Unroll your mat and get to cleaning.
Tayler's profile picture TaylerView
In these interests: essentialoilsfitnessyoga
Tayler's profile pictureViewessentialoilsfitnessyoga
Minimalist studio.Minimalist studio.
In these interests: fitnessyoga
Tayler's profile pictureViewfitnessyoga
Best yoga matsBest yoga mats
In these interests: fitnessyoga
Tayler's profile pictureViewfitnessyoga
People also read:
Man Running at Seaside
For some active self-improvement during the summer of social distancing!
DIY Face Mask for Running
A lightweight, breathable face mask to use when running in crowded areas.
DIY Phone Armband for Running
The simplest guide to making an armband you’re likely to find!
No Sew Running Belt
No basketball jerseys were hurt in the making of this guide! Okay, maybe one was.
Connect Peloton Music playlist to your Spotify or Apple Music account
Access the tracks you heart during your Peloton workouts in your Spotify or Apple account.
So you just crushed it on the Peloton Bike, but when you check your Apple Watch no activity has tracked.
Fingers to toes.
Unravel your perfect mat.
I was looking for a healthier way to drink iced coffee and had the idea of using protein powder as a way to add flavor and, of course, protein.
Vibram Five Finger shoes are awesome for running, hiking, and looking weird around town. Unfortunately, toe shoes start to smell if you don’t wear socks with them every time you wear them.
Man Running at Seaside
For some active self-improvement during the summer of social distancing!
DIY Face Mask for Running
A lightweight, breathable face mask to use when running in crowded areas.
DIY Phone Armband for Running
The simplest guide to making an armband you’re likely to find!
No Sew Running Belt
No basketball jerseys were hurt in the making of this guide! Okay, maybe one was.
Connect Peloton Music playlist to your Spotify or Apple Music account
Access the tracks you heart during your Peloton workouts in your Spotify or Apple account.
Man Running at Seaside
Man Running at SeasideThe Top Ten Best Running Accessories for 2020
DIY Face Mask for Running
DIY Face Mask for RunningHow to Make Your Own DIY Face Mask for Running
DIY Phone Armband for Running
DIY Phone Armband for RunningDIY Phone Armband for Running
No Sew Running Belt
No Sew Running BeltHow to Make a DIY No-Sew Running Belt
Connect Peloton Music playlist to your Spotify or Apple Music account
Connect Peloton Music playlist to your Spotify or Apple Music accountHow to connect Peloton Music to your Spotify account
So you just crushed it on the Peloton Bike, but when you check your Apple Watch no activity has tracked.
Fingers to toes.
Unravel your perfect mat.
I was looking for a healthier way to drink iced coffee and had the idea of using protein powder as a way to add flavor and, of course, protein.
Vibram Five Finger shoes are awesome for running, hiking, and looking weird around town. Unfortunately, toe shoes start to smell if you don’t wear socks with them every time you wear them.
How to Sync your Peloton Workout with Your Apple Watch
Fingers to toes.
Fingers to toes.How to Choose the Perfect Yoga Mat
How to make protein iced coffee
How to Disinfect Vibram Five Finger Toe Shoes Without Ruining Them
Posted in these interests:
YogaYoga
yoga
PRIMARY
PRIMARY
ExploreExplore
Discuss this guide:
We’re hiring!
Are you a passionate writer? We want to hear from you!
We’re hiring!
Are you a passionate writer? We want to hear from you!
View openings

Want to support Howchoo? When you buy a tool or material through one of our Amazon links, we earn a small commission as an Amazon Associate.

Donate
Tyler's profile pictureTyler
Joined in 2015
Software Engineer and creator of howchoo.
Related to this guide:
How to Jump Start a CarHow to Jump Start a Car
Jump start your car like a pro and get back on the road!
Tyler's profile picture TylerView
In these interests: diyautos
How to change your Honda Element's engine oilHow to change your Honda Element's engine oil
Changing your Element’s oil yourself is quick and easy.
Zach's profile picture ZachView
How to replace the air filter housing on a 2001 Toyota 4runnerHow to replace the air filter housing on a 2001 Toyota 4runner
This guide will likely work on 4runners within a few years of 2001. All you have to do is make sure the part you buy is the correct part.
Tyler's profile picture TylerView
In these interests: autosauto4runner
People also read:
Before you buy a car you will likely want to get a vehicle history report.
About to trade out those old clear strings for fresh black nylons!
How to keep your uk’ playing like new.
Raspberry Pi Projects
Find amazing Pi projects for any skill level!
Start your digital music career today.
Build your own security camera with motionEyeOS.
Posted in these interests:
autosautos
autos
PRIMARY
Here in my car, I feel safest of all / I can lock all my doors, it’s the only way to live / In cars
diydiy
“It takes half your life before you discover life is a do-it-yourself project.” – Napoleon Hill
Discuss this guide:
We’re hiring!
Are you a passionate writer or editor? We want to hear from you!
We’re hiring!
Are you a passionate writer or editor? We want to hear from you!

Want to support Howchoo? When you buy a tool or material through one of our Amazon links, we earn a small commission as an Amazon Associate.

Want to support Howchoo? When you buy a tool or material through one of our Amazon links, we earn a small commission as an Amazon Associate.

Total time: 2 minutes 
Updated: July 22nd, 2020
python
PRIMARY
67 guides
code
68 guides
Calling all writers!

We’re hiring. Write for Howchoo

python
PRIMARY
67 guides
code
68 guides
Calling all writers!

We’re hiring. Write for Howchoo

Tyler's profile pictureTyler
Joined in 2015
Software Engineer and creator of howchoo.
Get the latest edition of Python in just minutes.
Ash's profile picture AshView
In these interests: codewindowspython
Run Python scripts in command prompt without typing the whole path.
Ash's profile picture AshView
In these interests: windowscodepython
You can run any Python script in a command-line interface.
Ash's profile picture AshView
In these interests: python
Got a Python question? We’ve probably answered it here.
Not sure what version of Python you’re running? Time to find out!
Python is a very popular programming language for data visualization.
In Python, comprehensions are a useful construct that allows us to create new sequences in a very concise way.
Slack has become one of the most important tools for communication in many companies, mine included.
If you’re familiar with Python’s keyword-only arguments, then you’ve probably wondered why the same constraint doesn’t exist for positional arguments. This changes with Python 3.
Specify a parallel filesystem cache for compiled bytecode
Learn how to use formatted string literals in Python
While this requirement may seem rare, learning how to nest defaultdicts properly in Python can be extremely powerful and save you from bloated and confusing initialization code.
python
PRIMARY
Python is howchoo’s favorite programming language. We believe python promotes the most organized and performant codebase possible. We also love Django so, naturally, we love Python.
Code is poetry — one line at a time.
Total time: 20 minutes 
Updated: July 22nd, 2020
python
PRIMARY
67 guides
django
6 guides
Calling all writers!

We’re hiring. Write for Howchoo

python
PRIMARY
67 guides
django
6 guides
Calling all writers!

We’re hiring. Write for Howchoo

Tyler's profile pictureTyler
Joined in 2015
Software Engineer and creator of howchoo.
Get the latest edition of Python in just minutes.
Ash's profile picture AshView
In these interests: codewindowspython
Run Python scripts in command prompt without typing the whole path.
Ash's profile picture AshView
In these interests: windowscodepython
You can run any Python script in a command-line interface.
Ash's profile picture AshView
In these interests: python
Got a Python question? We’ve probably answered it here.
Not sure what version of Python you’re running? Time to find out!
Python is a very popular programming language for data visualization.
In Python, comprehensions are a useful construct that allows us to create new sequences in a very concise way.
Slack has become one of the most important tools for communication in many companies, mine included.
If you’re familiar with Python’s keyword-only arguments, then you’ve probably wondered why the same constraint doesn’t exist for positional arguments. This changes with Python 3.
Specify a parallel filesystem cache for compiled bytecode
Learn how to use formatted string literals in Python
While this requirement may seem rare, learning how to nest defaultdicts properly in Python can be extremely powerful and save you from bloated and confusing initialization code.
python
PRIMARY
Python is howchoo’s favorite programming language. We believe python promotes the most organized and performant codebase possible. We also love Django so, naturally, we love Python.

Secure Your Sensitive Data with Kubernetes Secrets

Secure Your Sensitive Data with Kubernetes SecretsSecure Your Sensitive Data with Kubernetes Secrets
Learn how to create and use Kubernetes secrets
Tyler Tyler (286)
Total time: 20 minutes 
Updated: July 22nd, 2020

Kubernetes secrets are objects that store and manage sensitive data inside your Kubernetes cluster. One mistake developers often make is storing sensitive information like database passwords, API credentials, etc in a settings file in their codebase. This is very bad practice (hopefully for obvious reasons). Most developers know this, but still choose the option because it’s easy.

Fortunately, if you’re running your application in a Kubernetes cluster, managing that sensitive data the right way is easy. This guide will provide an overview to Kubernetes Secrets, including how to create, store, and use secrets in your applications.

Posted in these interests:

kubernetes
PRIMARY
7 guides
code
68 guides
devops
6 guides

Creating secrets, like most Kubernetes operations, is accomplished using the kubectl command. Fortunately, there are a few ways to create secrets, and each are useful in different circumstances.

Let’s first look at the secret we want to create. Remember that the secret is an object that contains one or more pieces of sensitive data. For our example, let’s imagine we want to create a secret, called database, that contains our database credentials. It will be constructed like this:

database - username - password 

Create a secret from files

Suppose you have the following files: username and password. They might have been created like this:

echo -n 'databaseuser' > ./username echo -n '1234567890' > ./password

We can use these files to construct our secret:

kubectl create secret generic database --from-file=./username --from-file=./password

Create a secret from string literals

If you’d prefer, you can skip the files altogether and create the secret from string literals:

kubectl create secret generic database --from-literal=username=databaseuser --from-literal=password=databaseuser

Examine the new secret

Both of the above examples will create identical secrets that look like this:

$ kubectl get secret database NAME TYPE DATA AGE database Opaque 2 1h

And let’s example the secret:

$ kubectl describe secret database Name: database Namespace: default Labels:  Annotations: Type: Opaque Data ==== username: 12 bytes password: 10 bytes

Copy secrets from another cluster or namespace

While this is directly applicable, I’ll add this as a note because it could be useful. Sometimes we’ll need to copy secrets from one cluster or namespace to another. Here’s a quick example:

kubectl get secret database --context source_context --export -o yaml | kubectl apply --context destination_context -f -

For an explanation and more details, see our guide on copying Kubernetes secrets from one cluster to another.

Secrets aren’t all that helpful until they’re attached to a pod. In order to actually use the secrets they must be configured in the pod definition.

There are two primary ways two use secrets: as files and as environment variables.

Attaching secrets as files

See the following pod config:

apiVersion: v1 kind: Pod metadata: name: web spec: containers: - name: web image: web:1.0.0 volumeMounts: - name: database-volume mountPath: "/etc/secrets/database" readOnly: true volumes: - name: database-volume secret: secretName: database 

There are two important blocks to take note of. First, let’s look at the volumes block. We set the name of the volume and specify which secret we want to use. Note that this is set at the pod level, so it could be used in multiple containers if the pod were to define them.

volumes: - name: database-volume secret: secretName: database 

Next we’ll look at how the volume is mounted onto the container using volumeMounts. We’ll specify which volume we want to use, and set the mount path to /etc/secrets/database.

volumeMounts: - name: database-volume mountPath: "/etc/secrets/database" readOnly: true 

Inside of the container, we can run an ls on /etc/secrets/database and find that both the username and password files exist.

Attaching secrets as environment variables

Secrets can also be used inside of containers as environment variables. Check out the same config but with secrets attached as environment variables instead of volumes:

apiVersion: v1 kind: Pod metadata: name: web spec: containers: - name: web image: web:1.0.0 env: - name: DATABASE_USERNAME valueFrom: secretKeyRef: name: database key: username - name: DATABASE_PASSWORD valueFrom: secretKeyRef: name: database key: password 

Summary

Both volumes and environment variables are perfectly acceptable ways to access secrets from inside your containers. The major difference is that environment variables can only hold a single value, while volumes can hold any number of files—even nested directories. So if your application requires access to many secrets, a volume is a better choice for organization and to keep the configs manageable.

I know some readers will not be using Python containers, but the purpose of this step is to provide a conceptual understanding of how secrets can be used from within the container.

Assuming you’ve followed the first two steps, you should now have a database secret that contains a username and password.

Reading secrets from a volume

If we’ve mounted the secret as a volume, we can read the secret like this:

with open('/etc/secrets/database/password, 'r') as secret_file: database_password = secret_file.read()

Grabbing the secret file is as easy reading from a file. Of course, you’d probably abstract this code and add error handling and defaults. After all, this is much more pleasant: get_secret('database/password').

Reading secrets from environment variables

This is even more straight forward, at least in Python. You can read the secret just as you would any other environment variable:

import os database_password = os.environ.get('DATABASE_PASSWORD')

I hope this overview of Kubernetes secrets was helpful. By now, you should have a good understand of what Kubernetes secrets are and how to use them. If you have questions, please ask in the comments below or head over to the Kubernetes secrets documentation.

Secure Your Sensitive Data with Kubernetes Secrets

Secure Your Sensitive Data with Kubernetes SecretsSecure Your Sensitive Data with Kubernetes Secrets
Learn how to create and use Kubernetes secrets
Tyler Tyler (286)
Total time: 20 minutes 
Updated: July 22nd, 2020

Kubernetes secrets are objects that store and manage sensitive data inside your Kubernetes cluster. One mistake developers often make is storing sensitive information like database passwords, API credentials, etc in a settings file in their codebase. This is very bad practice (hopefully for obvious reasons). Most developers know this, but still choose the option because it’s easy.

Fortunately, if you’re running your application in a Kubernetes cluster, managing that sensitive data the right way is easy. This guide will provide an overview to Kubernetes Secrets, including how to create, store, and use secrets in your applications.

Posted in these interests:

kubernetes
PRIMARY
7 guides
code
68 guides
devops
6 guides

Creating secrets, like most Kubernetes operations, is accomplished using the kubectl command. Fortunately, there are a few ways to create secrets, and each are useful in different circumstances.

Let’s first look at the secret we want to create. Remember that the secret is an object that contains one or more pieces of sensitive data. For our example, let’s imagine we want to create a secret, called database, that contains our database credentials. It will be constructed like this:

database - username - password 

Create a secret from files

Suppose you have the following files: username and password. They might have been created like this:

echo -n 'databaseuser' > ./username echo -n '1234567890' > ./password

We can use these files to construct our secret:

kubectl create secret generic database --from-file=./username --from-file=./password

Create a secret from string literals

If you’d prefer, you can skip the files altogether and create the secret from string literals:

kubectl create secret generic database --from-literal=username=databaseuser --from-literal=password=databaseuser

Examine the new secret

Both of the above examples will create identical secrets that look like this:

$ kubectl get secret database NAME TYPE DATA AGE database Opaque 2 1h

And let’s example the secret:

$ kubectl describe secret database Name: database Namespace: default Labels:  Annotations: Type: Opaque Data ==== username: 12 bytes password: 10 bytes

Copy secrets from another cluster or namespace

While this is directly applicable, I’ll add this as a note because it could be useful. Sometimes we’ll need to copy secrets from one cluster or namespace to another. Here’s a quick example:

kubectl get secret database --context source_context --export -o yaml | kubectl apply --context destination_context -f -

For an explanation and more details, see our guide on copying Kubernetes secrets from one cluster to another.

Secrets aren’t all that helpful until they’re attached to a pod. In order to actually use the secrets they must be configured in the pod definition.

There are two primary ways two use secrets: as files and as environment variables.

Attaching secrets as files

See the following pod config:

apiVersion: v1 kind: Pod metadata: name: web spec: containers: - name: web image: web:1.0.0 volumeMounts: - name: database-volume mountPath: "/etc/secrets/database" readOnly: true volumes: - name: database-volume secret: secretName: database 

There are two important blocks to take note of. First, let’s look at the volumes block. We set the name of the volume and specify which secret we want to use. Note that this is set at the pod level, so it could be used in multiple containers if the pod were to define them.

volumes: - name: database-volume secret: secretName: database 

Next we’ll look at how the volume is mounted onto the container using volumeMounts. We’ll specify which volume we want to use, and set the mount path to /etc/secrets/database.

volumeMounts: - name: database-volume mountPath: "/etc/secrets/database" readOnly: true 

Inside of the container, we can run an ls on /etc/secrets/database and find that both the username and password files exist.

Attaching secrets as environment variables

Secrets can also be used inside of containers as environment variables. Check out the same config but with secrets attached as environment variables instead of volumes:

apiVersion: v1 kind: Pod metadata: name: web spec: containers: - name: web image: web:1.0.0 env: - name: DATABASE_USERNAME valueFrom: secretKeyRef: name: database key: username - name: DATABASE_PASSWORD valueFrom: secretKeyRef: name: database key: password 

Summary

Both volumes and environment variables are perfectly acceptable ways to access secrets from inside your containers. The major difference is that environment variables can only hold a single value, while volumes can hold any number of files—even nested directories. So if your application requires access to many secrets, a volume is a better choice for organization and to keep the configs manageable.

I know some readers will not be using Python containers, but the purpose of this step is to provide a conceptual understanding of how secrets can be used from within the container.

Assuming you’ve followed the first two steps, you should now have a database secret that contains a username and password.

Reading secrets from a volume

If we’ve mounted the secret as a volume, we can read the secret like this:

with open('/etc/secrets/database/password, 'r') as secret_file: database_password = secret_file.read()

Grabbing the secret file is as easy reading from a file. Of course, you’d probably abstract this code and add error handling and defaults. After all, this is much more pleasant: get_secret('database/password').

Reading secrets from environment variables

This is even more straight forward, at least in Python. You can read the secret just as you would any other environment variable:

import os database_password = os.environ.get('DATABASE_PASSWORD')

I hope this overview of Kubernetes secrets was helpful. By now, you should have a good understand of what Kubernetes secrets are and how to use them. If you have questions, please ask in the comments below or head over to the Kubernetes secrets documentation.

Jump to step

Secure Your Sensitive Data with Kubernetes Secrets

Secure Your Sensitive Data with Kubernetes SecretsSecure Your Sensitive Data with Kubernetes Secrets
Learn how to create and use Kubernetes secrets
Tyler Tyler (286)
Total time: 20 minutes 
Updated: July 22nd, 2020

Kubernetes secrets are objects that store and manage sensitive data inside your Kubernetes cluster. One mistake developers often make is storing sensitive information like database passwords, API credentials, etc in a settings file in their codebase. This is very bad practice (hopefully for obvious reasons). Most developers know this, but still choose the option because it’s easy.

Fortunately, if you’re running your application in a Kubernetes cluster, managing that sensitive data the right way is easy. This guide will provide an overview to Kubernetes Secrets, including how to create, store, and use secrets in your applications.

Posted in these interests:

kubernetes
PRIMARY
7 guides
code
68 guides
devops
6 guides

Creating secrets, like most Kubernetes operations, is accomplished using the kubectl command. Fortunately, there are a few ways to create secrets, and each are useful in different circumstances.

Let’s first look at the secret we want to create. Remember that the secret is an object that contains one or more pieces of sensitive data. For our example, let’s imagine we want to create a secret, called database, that contains our database credentials. It will be constructed like this:

database - username - password 

Create a secret from files

Suppose you have the following files: username and password. They might have been created like this:

echo -n 'databaseuser' > ./username echo -n '1234567890' > ./password

We can use these files to construct our secret:

kubectl create secret generic database --from-file=./username --from-file=./password

Create a secret from string literals

If you’d prefer, you can skip the files altogether and create the secret from string literals:

kubectl create secret generic database --from-literal=username=databaseuser --from-literal=password=databaseuser

Examine the new secret

Both of the above examples will create identical secrets that look like this:

$ kubectl get secret database NAME TYPE DATA AGE database Opaque 2 1h

And let’s example the secret:

$ kubectl describe secret database Name: database Namespace: default Labels:  Annotations: Type: Opaque Data ==== username: 12 bytes password: 10 bytes

Copy secrets from another cluster or namespace

While this is directly applicable, I’ll add this as a note because it could be useful. Sometimes we’ll need to copy secrets from one cluster or namespace to another. Here’s a quick example:

kubectl get secret database --context source_context --export -o yaml | kubectl apply --context destination_context -f -

For an explanation and more details, see our guide on copying Kubernetes secrets from one cluster to another.

Secrets aren’t all that helpful until they’re attached to a pod. In order to actually use the secrets they must be configured in the pod definition.

There are two primary ways two use secrets: as files and as environment variables.

Attaching secrets as files

See the following pod config:

apiVersion: v1 kind: Pod metadata: name: web spec: containers: - name: web image: web:1.0.0 volumeMounts: - name: database-volume mountPath: "/etc/secrets/database" readOnly: true volumes: - name: database-volume secret: secretName: database 

There are two important blocks to take note of. First, let’s look at the volumes block. We set the name of the volume and specify which secret we want to use. Note that this is set at the pod level, so it could be used in multiple containers if the pod were to define them.

volumes: - name: database-volume secret: secretName: database 

Next we’ll look at how the volume is mounted onto the container using volumeMounts. We’ll specify which volume we want to use, and set the mount path to /etc/secrets/database.

volumeMounts: - name: database-volume mountPath: "/etc/secrets/database" readOnly: true 

Inside of the container, we can run an ls on /etc/secrets/database and find that both the username and password files exist.

Attaching secrets as environment variables

Secrets can also be used inside of containers as environment variables. Check out the same config but with secrets attached as environment variables instead of volumes:

apiVersion: v1 kind: Pod metadata: name: web spec: containers: - name: web image: web:1.0.0 env: - name: DATABASE_USERNAME valueFrom: secretKeyRef: name: database key: username - name: DATABASE_PASSWORD valueFrom: secretKeyRef: name: database key: password 

Summary

Both volumes and environment variables are perfectly acceptable ways to access secrets from inside your containers. The major difference is that environment variables can only hold a single value, while volumes can hold any number of files—even nested directories. So if your application requires access to many secrets, a volume is a better choice for organization and to keep the configs manageable.

I know some readers will not be using Python containers, but the purpose of this step is to provide a conceptual understanding of how secrets can be used from within the container.

Assuming you’ve followed the first two steps, you should now have a database secret that contains a username and password.

Reading secrets from a volume

If we’ve mounted the secret as a volume, we can read the secret like this:

with open('/etc/secrets/database/password, 'r') as secret_file: database_password = secret_file.read()

Grabbing the secret file is as easy reading from a file. Of course, you’d probably abstract this code and add error handling and defaults. After all, this is much more pleasant: get_secret('database/password').

Reading secrets from environment variables

This is even more straight forward, at least in Python. You can read the secret just as you would any other environment variable:

import os database_password = os.environ.get('DATABASE_PASSWORD')

I hope this overview of Kubernetes secrets was helpful. By now, you should have a good understand of what Kubernetes secrets are and how to use them. If you have questions, please ask in the comments below or head over to the Kubernetes secrets documentation.

Secure Your Sensitive Data with Kubernetes Secrets

Secure Your Sensitive Data with Kubernetes SecretsSecure Your Sensitive Data with Kubernetes Secrets
Learn how to create and use Kubernetes secrets
Tyler Tyler (286)
Total time: 20 minutes 
Updated: July 22nd, 2020

Kubernetes secrets are objects that store and manage sensitive data inside your Kubernetes cluster. One mistake developers often make is storing sensitive information like database passwords, API credentials, etc in a settings file in their codebase. This is very bad practice (hopefully for obvious reasons). Most developers know this, but still choose the option because it’s easy.

Fortunately, if you’re running your application in a Kubernetes cluster, managing that sensitive data the right way is easy. This guide will provide an overview to Kubernetes Secrets, including how to create, store, and use secrets in your applications.

Posted in these interests:

kubernetes
PRIMARY
7 guides
code
68 guides
devops
6 guides

Secure Your Sensitive Data with Kubernetes Secrets

kubernetescodedevops
Learn how to create and use Kubernetes secrets
Tyler Tyler (286)
Total time: 20 minutes 
Updated: July 22nd, 2020
Tyler
1
 

Posted in these interests:

kubernetes
PRIMARY
7 guides
code
68 guides
devops
6 guides
kubernetes
PRIMARY
7 guides
code
68 guides
devops
6 guides
PRIMARY
Jump to step
Calling all writers!

We’re hiring. Write for Howchoo

1
 
In these interests
kubernetes
PRIMARY
7 guides
code
68 guides
devops
6 guides
kubernetes
PRIMARY
7 guides
code
68 guides
devops
6 guides
PRIMARY
Jump to step

Creating secrets, like most Kubernetes operations, is accomplished using the kubectl command. Fortunately, there are a few ways to create secrets, and each are useful in different circumstances.

Let’s first look at the secret we want to create. Remember that the secret is an object that contains one or more pieces of sensitive data. For our example, let’s imagine we want to create a secret, called database, that contains our database credentials. It will be constructed like this:

database - username - password 

Create a secret from files

Suppose you have the following files: username and password. They might have been created like this:

echo -n 'databaseuser' > ./username echo -n '1234567890' > ./password

We can use these files to construct our secret:

kubectl create secret generic database --from-file=./username --from-file=./password

Create a secret from string literals

If you’d prefer, you can skip the files altogether and create the secret from string literals:

kubectl create secret generic database --from-literal=username=databaseuser --from-literal=password=databaseuser

Examine the new secret

Both of the above examples will create identical secrets that look like this:

$ kubectl get secret database NAME TYPE DATA AGE database Opaque 2 1h

And let’s example the secret:

$ kubectl describe secret database Name: database Namespace: default Labels:  Annotations: Type: Opaque Data ==== username: 12 bytes password: 10 bytes

Copy secrets from another cluster or namespace

While this is directly applicable, I’ll add this as a note because it could be useful. Sometimes we’ll need to copy secrets from one cluster or namespace to another. Here’s a quick example:

kubectl get secret database --context source_context --export -o yaml | kubectl apply --context destination_context -f -

For an explanation and more details, see our guide on copying Kubernetes secrets from one cluster to another.

Secrets aren’t all that helpful until they’re attached to a pod. In order to actually use the secrets they must be configured in the pod definition.

There are two primary ways two use secrets: as files and as environment variables.

Attaching secrets as files

See the following pod config:

apiVersion: v1 kind: Pod metadata: name: web spec: containers: - name: web image: web:1.0.0 volumeMounts: - name: database-volume mountPath: "/etc/secrets/database" readOnly: true volumes: - name: database-volume secret: secretName: database 

There are two important blocks to take note of. First, let’s look at the volumes block. We set the name of the volume and specify which secret we want to use. Note that this is set at the pod level, so it could be used in multiple containers if the pod were to define them.

volumes: - name: database-volume secret: secretName: database 

Next we’ll look at how the volume is mounted onto the container using volumeMounts. We’ll specify which volume we want to use, and set the mount path to /etc/secrets/database.

volumeMounts: - name: database-volume mountPath: "/etc/secrets/database" readOnly: true 

Inside of the container, we can run an ls on /etc/secrets/database and find that both the username and password files exist.

Attaching secrets as environment variables

Secrets can also be used inside of containers as environment variables. Check out the same config but with secrets attached as environment variables instead of volumes:

apiVersion: v1 kind: Pod metadata: name: web spec: containers: - name: web image: web:1.0.0 env: - name: DATABASE_USERNAME valueFrom: secretKeyRef: name: database key: username - name: DATABASE_PASSWORD valueFrom: secretKeyRef: name: database key: password 

Summary

Both volumes and environment variables are perfectly acceptable ways to access secrets from inside your containers. The major difference is that environment variables can only hold a single value, while volumes can hold any number of files—even nested directories. So if your application requires access to many secrets, a volume is a better choice for organization and to keep the configs manageable.

I know some readers will not be using Python containers, but the purpose of this step is to provide a conceptual understanding of how secrets can be used from within the container.

Assuming you’ve followed the first two steps, you should now have a database secret that contains a username and password.

Reading secrets from a volume

If we’ve mounted the secret as a volume, we can read the secret like this:

with open('/etc/secrets/database/password, 'r') as secret_file: database_password = secret_file.read()

Grabbing the secret file is as easy reading from a file. Of course, you’d probably abstract this code and add error handling and defaults. After all, this is much more pleasant: get_secret('database/password').

Reading secrets from environment variables

This is even more straight forward, at least in Python. You can read the secret just as you would any other environment variable:

import os database_password = os.environ.get('DATABASE_PASSWORD')

I hope this overview of Kubernetes secrets was helpful. By now, you should have a good understand of what Kubernetes secrets are and how to use them. If you have questions, please ask in the comments below or head over to the Kubernetes secrets documentation.

Creating secrets, like most Kubernetes operations, is accomplished using the kubectl command. Fortunately, there are a few ways to create secrets, and each are useful in different circumstances.

Let’s first look at the secret we want to create. Remember that the secret is an object that contains one or more pieces of sensitive data. For our example, let’s imagine we want to create a secret, called database, that contains our database credentials. It will be constructed like this:

database - username - password 

Create a secret from files

Suppose you have the following files: username and password. They might have been created like this:

echo -n 'databaseuser' > ./username echo -n '1234567890' > ./password

We can use these files to construct our secret:

kubectl create secret generic database --from-file=./username --from-file=./password

Create a secret from string literals

If you’d prefer, you can skip the files altogether and create the secret from string literals:

kubectl create secret generic database --from-literal=username=databaseuser --from-literal=password=databaseuser

Examine the new secret

Both of the above examples will create identical secrets that look like this:

$ kubectl get secret database NAME TYPE DATA AGE database Opaque 2 1h

And let’s example the secret:

$ kubectl describe secret database Name: database Namespace: default Labels:  Annotations: Type: Opaque Data ==== username: 12 bytes password: 10 bytes

Copy secrets from another cluster or namespace

While this is directly applicable, I’ll add this as a note because it could be useful. Sometimes we’ll need to copy secrets from one cluster or namespace to another. Here’s a quick example:

kubectl get secret database --context source_context --export -o yaml | kubectl apply --context destination_context -f -

For an explanation and more details, see our guide on copying Kubernetes secrets from one cluster to another.

Creating secrets, like most Kubernetes operations, is accomplished using the kubectl command. Fortunately, there are a few ways to create secrets, and each are useful in different circumstances.

Let’s first look at the secret we want to create. Remember that the secret is an object that contains one or more pieces of sensitive data. For our example, let’s imagine we want to create a secret, called database, that contains our database credentials. It will be constructed like this:

database - username - password 

Create a secret from files

Suppose you have the following files: username and password. They might have been created like this:

echo -n 'databaseuser' > ./username echo -n '1234567890' > ./password

We can use these files to construct our secret:

kubectl create secret generic database --from-file=./username --from-file=./password

Create a secret from string literals

If you’d prefer, you can skip the files altogether and create the secret from string literals:

kubectl create secret generic database --from-literal=username=databaseuser --from-literal=password=databaseuser

Examine the new secret

Both of the above examples will create identical secrets that look like this:

$ kubectl get secret database NAME TYPE DATA AGE database Opaque 2 1h

And let’s example the secret:

$ kubectl describe secret database Name: database Namespace: default Labels:  Annotations: Type: Opaque Data ==== username: 12 bytes password: 10 bytes

Copy secrets from another cluster or namespace

While this is directly applicable, I’ll add this as a note because it could be useful. Sometimes we’ll need to copy secrets from one cluster or namespace to another. Here’s a quick example:

kubectl get secret database --context source_context --export -o yaml | kubectl apply --context destination_context -f -

For an explanation and more details, see our guide on copying Kubernetes secrets from one cluster to another.

Create a Kubernetes secret

Mentioned here
How to Copy Secrets From One Kubernetes Cluster to Another

Secrets aren’t all that helpful until they’re attached to a pod. In order to actually use the secrets they must be configured in the pod definition.

There are two primary ways two use secrets: as files and as environment variables.

Attaching secrets as files

See the following pod config:

apiVersion: v1 kind: Pod metadata: name: web spec: containers: - name: web image: web:1.0.0 volumeMounts: - name: database-volume mountPath: "/etc/secrets/database" readOnly: true volumes: - name: database-volume secret: secretName: database 

There are two important blocks to take note of. First, let’s look at the volumes block. We set the name of the volume and specify which secret we want to use. Note that this is set at the pod level, so it could be used in multiple containers if the pod were to define them.

volumes: - name: database-volume secret: secretName: database 

Next we’ll look at how the volume is mounted onto the container using volumeMounts. We’ll specify which volume we want to use, and set the mount path to /etc/secrets/database.

volumeMounts: - name: database-volume mountPath: "/etc/secrets/database" readOnly: true 

Inside of the container, we can run an ls on /etc/secrets/database and find that both the username and password files exist.

Attaching secrets as environment variables

Secrets can also be used inside of containers as environment variables. Check out the same config but with secrets attached as environment variables instead of volumes:

apiVersion: v1 kind: Pod metadata: name: web spec: containers: - name: web image: web:1.0.0 env: - name: DATABASE_USERNAME valueFrom: secretKeyRef: name: database key: username - name: DATABASE_PASSWORD valueFrom: secretKeyRef: name: database key: password 

Summary

Both volumes and environment variables are perfectly acceptable ways to access secrets from inside your containers. The major difference is that environment variables can only hold a single value, while volumes can hold any number of files—even nested directories. So if your application requires access to many secrets, a volume is a better choice for organization and to keep the configs manageable.

Secrets aren’t all that helpful until they’re attached to a pod. In order to actually use the secrets they must be configured in the pod definition.

There are two primary ways two use secrets: as files and as environment variables.

Attaching secrets as files

See the following pod config:

apiVersion: v1 kind: Pod metadata: name: web spec: containers: - name: web image: web:1.0.0 volumeMounts: - name: database-volume mountPath: "/etc/secrets/database" readOnly: true volumes: - name: database-volume secret: secretName: database 

There are two important blocks to take note of. First, let’s look at the volumes block. We set the name of the volume and specify which secret we want to use. Note that this is set at the pod level, so it could be used in multiple containers if the pod were to define them.

volumes: - name: database-volume secret: secretName: database 

Next we’ll look at how the volume is mounted onto the container using volumeMounts. We’ll specify which volume we want to use, and set the mount path to /etc/secrets/database.

volumeMounts: - name: database-volume mountPath: "/etc/secrets/database" readOnly: true 

Inside of the container, we can run an ls on /etc/secrets/database and find that both the username and password files exist.

Attaching secrets as environment variables

Secrets can also be used inside of containers as environment variables. Check out the same config but with secrets attached as environment variables instead of volumes:

apiVersion: v1 kind: Pod metadata: name: web spec: containers: - name: web image: web:1.0.0 env: - name: DATABASE_USERNAME valueFrom: secretKeyRef: name: database key: username - name: DATABASE_PASSWORD valueFrom: secretKeyRef: name: database key: password 

Summary

Both volumes and environment variables are perfectly acceptable ways to access secrets from inside your containers. The major difference is that environment variables can only hold a single value, while volumes can hold any number of files—even nested directories. So if your application requires access to many secrets, a volume is a better choice for organization and to keep the configs manageable.

Attach secrets to your pod

I know some readers will not be using Python containers, but the purpose of this step is to provide a conceptual understanding of how secrets can be used from within the container.

Assuming you’ve followed the first two steps, you should now have a database secret that contains a username and password.

Reading secrets from a volume

If we’ve mounted the secret as a volume, we can read the secret like this:

with open('/etc/secrets/database/password, 'r') as secret_file: database_password = secret_file.read()

Grabbing the secret file is as easy reading from a file. Of course, you’d probably abstract this code and add error handling and defaults. After all, this is much more pleasant: get_secret('database/password').

Reading secrets from environment variables

This is even more straight forward, at least in Python. You can read the secret just as you would any other environment variable:

import os database_password = os.environ.get('DATABASE_PASSWORD')

I know some readers will not be using Python containers, but the purpose of this step is to provide a conceptual understanding of how secrets can be used from within the container.

Assuming you’ve followed the first two steps, you should now have a database secret that contains a username and password.

Reading secrets from a volume

If we’ve mounted the secret as a volume, we can read the secret like this:

with open('/etc/secrets/database/password, 'r') as secret_file: database_password = secret_file.read()

Grabbing the secret file is as easy reading from a file. Of course, you’d probably abstract this code and add error handling and defaults. After all, this is much more pleasant: get_secret('database/password').

Reading secrets from environment variables

This is even more straight forward, at least in Python. You can read the secret just as you would any other environment variable:

import os database_password = os.environ.get('DATABASE_PASSWORD')

Accessing secrets from within the container (using Python)

I hope this overview of Kubernetes secrets was helpful. By now, you should have a good understand of what Kubernetes secrets are and how to use them. If you have questions, please ask in the comments below or head over to the Kubernetes secrets documentation.

I hope this overview of Kubernetes secrets was helpful. By now, you should have a good understand of what Kubernetes secrets are and how to use them. If you have questions, please ask in the comments below or head over to the Kubernetes secrets documentation.

Conclusion

Calling all writers!

We’re hiring. Write for Howchoo

Tyler's profile pictureTyler
Joined in 2015
Software Engineer and creator of howchoo.
Tyler's profile picture
Share this guide!
RedditEmailTextPinterest
Related to this guide:
Use "kubectl cp" to Copy Files to and from Kubernetes PodsUse "kubectl cp" to Copy Files to and from Kubernetes Pods
If you’re using Kubernetes, you may find the need to move files to and from containers running on pods.
Tyler's profile picture TylerView
In these interests: kubernetes
How to Read Kubernetes SecretsHow to Read Kubernetes Secrets
So you’ve started using Kubernetes secrets. At some point, you’ll probably want to see the secret in plain text, either to validate it or use it in another context.
Tyler's profile picture TylerView
In these interests: kubernetes
Install Prometheus and Grafana in your Kubernetes clusterInstall Prometheus and Grafana in your Kubernetes cluster
What is Prometheus? Prometheus is an open source systems monitoring toolkit originally developed by SoundCloud.
Tyler's profile picture TylerView
In these interests: devopskubernetes
Use "kubectl cp" to Copy Files to and from Kubernetes PodsUse "kubectl cp" to Copy Files to and from Kubernetes Pods
If you’re using Kubernetes, you may find the need to move files to and from containers running on pods.
Tyler's profile picture TylerView
In these interests: kubernetes
Tyler's profile pictureViewkubernetes
How to Read Kubernetes SecretsHow to Read Kubernetes Secrets
So you’ve started using Kubernetes secrets. At some point, you’ll probably want to see the secret in plain text, either to validate it or use it in another context.
Tyler's profile picture TylerView
In these interests: kubernetes
Tyler's profile pictureViewkubernetes
Install Prometheus and Grafana in your Kubernetes clusterInstall Prometheus and Grafana in your Kubernetes cluster
What is Prometheus? Prometheus is an open source systems monitoring toolkit originally developed by SoundCloud.
Tyler's profile picture TylerView
In these interests: devopskubernetes
Tyler's profile pictureViewdevopskubernetes
People also read:
Install Apache Superset in a Kubernetes cluster
Obviously we’d call this “Supernetes”
As a Kubernetes user, I find that I often need to trigger a kubernetes cron job manually, outside of its schedule. Fortunately, since the release of Kubernetes 1.
There are many reasons you might want to copy Kubernetes secrets from one cluster to another. In recent months, I had to migrate to a new GKE cluster in order to get some new functionality.
Python 3 Windows 10
Get the latest edition of Python in just minutes.
Python Path Variable Windows 10
Run Python scripts in command prompt without typing the whole path.
Python Version
Not sure what version of Python you’re running? Time to find out!
In Python, comprehensions are a useful construct that allows us to create new sequences in a very concise way.
If you’re familiar with Python’s keyword-only arguments, then you’ve probably wondered why the same constraint doesn’t exist for positional arguments. This changes with Python 3.
Specify a parallel filesystem cache for compiled bytecode
Install Apache Superset in a Kubernetes cluster
Obviously we’d call this “Supernetes”
As a Kubernetes user, I find that I often need to trigger a kubernetes cron job manually, outside of its schedule. Fortunately, since the release of Kubernetes 1.
There are many reasons you might want to copy Kubernetes secrets from one cluster to another. In recent months, I had to migrate to a new GKE cluster in order to get some new functionality.
Python 3 Windows 10
Get the latest edition of Python in just minutes.
Python Path Variable Windows 10
Run Python scripts in command prompt without typing the whole path.
Install Apache Superset in a Kubernetes cluster
Install Apache Superset in a Kubernetes clusterHow to install Apache Superset on a GKE Kubernetes Cluster
How to Create a Kubernetes Job From a Cron Job
How to Copy Secrets From One Kubernetes Cluster to Another
Python 3 Windows 10
Python 3 Windows 10How to Install Python 3 on Windows 10
Python Path Variable Windows 10
Python Path Variable Windows 10How to Add Python to the Path Variable on Windows 10
Python Version
Not sure what version of Python you’re running? Time to find out!
In Python, comprehensions are a useful construct that allows us to create new sequences in a very concise way.
If you’re familiar with Python’s keyword-only arguments, then you’ve probably wondered why the same constraint doesn’t exist for positional arguments. This changes with Python 3.
Specify a parallel filesystem cache for compiled bytecode
Python Version
Python VersionHow to Check Your Python Version
Python Dictionary Comprehension (With Examples)
How to Specify Positional-Only Parameters in Python
Use Pycache Prefix to Move pyc Files out of Your Source Code Starting in Python 3.8
How to Use Assignment Expressions in Python
Posted in these interests:
kuberneteskubernetes
kubernetes
PRIMARY
It’s pronounced “koob-er-net-ees”.
codecode
Code is poetry — one line at a time.
devopsdevops
“If you think it’s expensive to hire a professional, wait until you hire an amateur.”
kuberneteskubernetes
kubernetes
PRIMARY
It’s pronounced “koob-er-net-ees”.
PRIMARY
Explore
codecode
Code is poetry — one line at a time.
Explore
devopsdevops
“If you think it’s expensive to hire a professional, wait until you hire an amateur.”
Explore
Discuss this guide:
We’re hiring!
Are you a passionate writer? We want to hear from you!
We’re hiring!
Are you a passionate writer? We want to hear from you!
View openings

Want to support Howchoo? When you buy a tool or material through one of our Amazon links, we earn a small commission as an Amazon Associate.

Donate
Tyler's profile pictureTyler
Joined in 2015
Software Engineer and creator of howchoo.
Related to this guide:
Use "kubectl cp" to Copy Files to and from Kubernetes PodsUse "kubectl cp" to Copy Files to and from Kubernetes Pods
If you’re using Kubernetes, you may find the need to move files to and from containers running on pods.
Tyler's profile picture TylerView
In these interests: kubernetes
How to Read Kubernetes SecretsHow to Read Kubernetes Secrets
So you’ve started using Kubernetes secrets. At some point, you’ll probably want to see the secret in plain text, either to validate it or use it in another context.
Tyler's profile picture TylerView
In these interests: kubernetes
Install Prometheus and Grafana in your Kubernetes clusterInstall Prometheus and Grafana in your Kubernetes cluster
What is Prometheus? Prometheus is an open source systems monitoring toolkit originally developed by SoundCloud.
Tyler's profile picture TylerView
In these interests: devopskubernetes
People also read:
Install Apache Superset in a Kubernetes cluster
Obviously we’d call this “Supernetes”
As a Kubernetes user, I find that I often need to trigger a kubernetes cron job manually, outside of its schedule. Fortunately, since the release of Kubernetes 1.
There are many reasons you might want to copy Kubernetes secrets from one cluster to another. In recent months, I had to migrate to a new GKE cluster in order to get some new functionality.
Python Path Variable Windows 10
Run Python scripts in command prompt without typing the whole path.
Python Version
Not sure what version of Python you’re running? Time to find out!
In Python, comprehensions are a useful construct that allows us to create new sequences in a very concise way.
If you’re familiar with Python’s keyword-only arguments, then you’ve probably wondered why the same constraint doesn’t exist for positional arguments. This changes with Python 3.
Posted in these interests:
kuberneteskubernetes
kubernetes
PRIMARY
It’s pronounced “koob-er-net-ees”.
codecode
Code is poetry — one line at a time.
devopsdevops
“If you think it’s expensive to hire a professional, wait until you hire an amateur.”
Discuss this guide:
We’re hiring!
Are you a passionate writer or editor? We want to hear from you!
We’re hiring!
Are you a passionate writer or editor? We want to hear from you!

Want to support Howchoo? When you buy a tool or material through one of our Amazon links, we earn a small commission as an Amazon Associate.

Want to support Howchoo? When you buy a tool or material through one of our Amazon links, we earn a small commission as an Amazon Associate.

Total time: 2 minutes 
Updated: July 22nd, 2020
ruby
PRIMARY
2 guides
Calling all writers!

We’re hiring. Write for Howchoo

ruby
PRIMARY
2 guides
Calling all writers!

We’re hiring. Write for Howchoo

Tyler's profile pictureTyler
Joined in 2015
Software Engineer and creator of howchoo.
Ruby on Rails is one of the most popular web development frameworks, and Heroku has become a popular place to quickly deploy applications – and both for very good reason.
Tyler's profile picture TylerView
In these interests: coderailsruby
ruby
PRIMARY
Total time: 5 minutes 
Updated: July 22nd, 2020
unix
PRIMARY
13 guides
linux
41 guides
Calling all writers!

We’re hiring. Write for Howchoo

unix
PRIMARY
13 guides
linux
41 guides
Calling all writers!

We’re hiring. Write for Howchoo

Tyler's profile pictureTyler
Joined in 2015
Software Engineer and creator of howchoo.
This short guide will show you how to change you default shell on unix based operating systems.
Tyler's profile picture TylerView
In these interests: linuxunixosx
In these interests: unixlinux
For a few years now, I’ve been using iTerm 2 and tmux. But only recently did I find out about a pretty important feature of iTerm: tmux integration.
Tyler's profile picture TylerView
In these interests: linuxtmuxunix
Learn how to generate SSH keys on Linux/Unix systems.
Sometimes I type or paste a lot of text on the command line and there is a small error right in the middle. Sometimes I’ve run a command but I need to run it again but replace a word multiple times.
This short guide will teach you how to get a word count in Unix using Bash/Terminal.
If you want to find out how many characters are in a file here’s how!
Confirm your edition with a simple command.
Get your hands on a classic Linux flavor.
Pick your flavor of Linux.
Looking for a new flavor of Linux?
Get your favorite open-source OS on the Pi.
There are a few reasons you might want to set up password-less login via SSH. Manual login For manual login, typing your password over and over is a pain—especially if you’re doing this frequently.
unix
PRIMARY
Total time: 5 minutes 
Updated: July 22nd, 2020
python
PRIMARY
67 guides
code
68 guides
Calling all writers!

We’re hiring. Write for Howchoo

python
PRIMARY
67 guides
code
68 guides
Calling all writers!

We’re hiring. Write for Howchoo

Tyler's profile pictureTyler
Joined in 2015
Software Engineer and creator of howchoo.
Get the latest edition of Python in just minutes.
Ash's profile picture AshView
In these interests: codewindowspython
Run Python scripts in command prompt without typing the whole path.
Ash's profile picture AshView
In these interests: windowscodepython
You can run any Python script in a command-line interface.
Ash's profile picture AshView
In these interests: python
Got a Python question? We’ve probably answered it here.
Not sure what version of Python you’re running? Time to find out!
Python is a very popular programming language for data visualization.
In Python, comprehensions are a useful construct that allows us to create new sequences in a very concise way.
Slack has become one of the most important tools for communication in many companies, mine included.
If you’re familiar with Python’s keyword-only arguments, then you’ve probably wondered why the same constraint doesn’t exist for positional arguments. This changes with Python 3.
Specify a parallel filesystem cache for compiled bytecode
Learn how to use formatted string literals in Python
While this requirement may seem rare, learning how to nest defaultdicts properly in Python can be extremely powerful and save you from bloated and confusing initialization code.
python
PRIMARY
Python is howchoo’s favorite programming language. We believe python promotes the most organized and performant codebase possible. We also love Django so, naturally, we love Python.
Code is poetry — one line at a time.