Home Explore Blog CI



kubernetes

7th chunk of `content/en/blog/_posts/2017-11-00-Kubernetes-Easy-Way.md`
96124b0a16753662e0e67322693d7a8b2a17d90f6151330900000001000004f5
![](https://lh6.googleusercontent.com/Mbs04O7PFJ6yFRRmPo2PDs3MU5IyKq53jrgSB6Xcm1Ki8eStJacoRsPDqv5_m92E0Ki-r-hi_4nbaAqUKRXNE57-TJbmacM3vqrkwM-3ASuBGmmugGc-QkHgfQrRSuAzCP60bSzA)  

We have the option to use a dockerfile, or to use a template if we need help creating a dockerfile. In this case, the demochat repo already has a dockerfile so we’ll select that. Click through the next few screens until the image builds.   

Once the build is finished the image is automatically saved inside of the Codefresh docker registry. You can also add any [other registry to your account](https://docs.codefresh.io/v1.0/docs/docker-registry) and use that instead.  

To deploy the image we’ll need  

- a pull secret
- the image name and registry
- the ports that will be used


### Creating the Pull Secret
The pull secret is a token that the Kubernetes cluster can use to access a private Docker registry. To create one, we’ll need to generate the token and save it to Codefresh.   

1. Click on **User Settings** (bottom left) and generate a new token.   

2. Copy the token to your clipboard.  

 ![](https://lh5.googleusercontent.com/fJxTvuK0b-ssLls87EgSccmpZoRk_KXTQdxOglvgKlPHlc6pr-yNBht4rKYyLcFF7SERS2czWLSh_YUNGOy7Q9UjQqlGNKJdmG1uyDpVr_IIx3BqsauxfXnIrEtQbdXKAOg-nfr3)

Title: Building the Image and Creating a Pull Secret
Summary
The user has the option to either use a dockerfile or a template to create one. The demochat repo already has a dockerfile so it will be selected. Once the build is finished, the image is automatically saved inside of the Codefresh docker registry. To deploy the image, a pull secret, the image name and registry, and the ports that will be used are needed. The pull secret is a token that the Kubernetes cluster can use to access a private Docker registry. To create one, the user needs to generate a new token in User Settings and copy it to the clipboard.